App-template
26 строк · 635.0 Байт
1"""${message}
2
3Revision ID: ${up_revision}
4Revises: ${down_revision | comma,n}
5Create Date: ${create_date}
6
7"""
8from typing import Sequence, Union
9
10from alembic import op
11import sqlalchemy as sa
12${imports if imports else ""}
13
14# revision identifiers, used by Alembic.
15revision: str = ${repr(up_revision)}
16down_revision: Union[str, None] = ${repr(down_revision)}
17branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
18depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
19
20
21def upgrade() -> None:
22${upgrades if upgrades else "pass"}
23
24
25def downgrade() -> None:
26${downgrades if downgrades else "pass"}
27