Skip to content

Commit 3e79bb9

Browse files
fix: add alembic merge migration to resolve multiple heads (#370)
009_wallet_fields and 009_add_archived both descend from 008_encrypt_accounting_pw, causing 'alembic upgrade head' to fail in deploy.sh with "Multiple head revisions are present". Adds merge migration 010_merge_heads to unify the two branches into a single head. Also fixes a mypy error in get_owner_endpoint: Starlette 0.36+ requires TemplateResponse(request, name, context) — request moves out of context dict.
1 parent 36b3cc9 commit 3e79bb9

2 files changed

Lines changed: 26 additions & 1 deletion

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"""Merge the 009_wallet_fields and 009_add_archived branch heads.
2+
3+
Both migrations descended from 008_encrypt_accounting_pw independently,
4+
creating two alembic heads. This merge migration unifies the graph so that
5+
'alembic upgrade head' resolves to a single target.
6+
7+
Revision ID: 010_merge_heads
8+
Revises: 009_wallet_fields, 009_add_archived
9+
Create Date: 2026-04-28 00:00:00.000000+00:00
10+
"""
11+
12+
from collections.abc import Sequence
13+
14+
revision: str = "010_merge_heads"
15+
down_revision: tuple[str, str] = ("009_wallet_fields", "009_add_archived")
16+
branch_labels: str | Sequence[str] | None = None
17+
depends_on: str | Sequence[str] | None = None
18+
19+
20+
def upgrade() -> None:
21+
pass
22+
23+
24+
def downgrade() -> None:
25+
pass

components/backend/src/syfthub/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,9 +623,9 @@ async def get_owner_endpoint(
623623
readme_html = sanitize_readme_html(raw_html)
624624

625625
return templates.TemplateResponse(
626+
request,
626627
"endpoint.html",
627628
{
628-
"request": request,
629629
"endpoint": endpoint,
630630
"owner_name": owner_name,
631631
"owner_slug": owner_slug,

0 commit comments

Comments
 (0)