diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-03-22 19:56:47 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-03-22 20:19:27 +0300 |
| commit | 536d022e8a55f6e53f01dfb7e0fae2ef24385aad (patch) | |
| tree | 721d7195db7fc12c725b27301f77e345df64d1b4 /alembic/script.py.mako | |
| download | vpn_manager_bot-536d022e8a55f6e53f01dfb7e0fae2ef24385aad.tar.gz vpn_manager_bot-536d022e8a55f6e53f01dfb7e0fae2ef24385aad.zip | |
Init project
Diffstat (limited to 'alembic/script.py.mako')
| -rw-r--r-- | alembic/script.py.mako | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/alembic/script.py.mako b/alembic/script.py.mako new file mode 100644 index 0000000..1101630 --- /dev/null +++ b/alembic/script.py.mako | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | """${message} | ||
| 2 | |||
| 3 | Revision ID: ${up_revision} | ||
| 4 | Revises: ${down_revision | comma,n} | ||
| 5 | Create Date: ${create_date} | ||
| 6 | |||
| 7 | """ | ||
| 8 | from typing import Sequence, Union | ||
| 9 | |||
| 10 | from alembic import op | ||
| 11 | import sqlalchemy as sa | ||
| 12 | ${imports if imports else ""} | ||
| 13 | |||
| 14 | # revision identifiers, used by Alembic. | ||
| 15 | revision: str = ${repr(up_revision)} | ||
| 16 | down_revision: Union[str, Sequence[str], None] = ${repr(down_revision)} | ||
| 17 | branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)} | ||
| 18 | depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)} | ||
| 19 | |||
| 20 | |||
| 21 | def upgrade() -> None: | ||
| 22 | """Upgrade schema.""" | ||
| 23 | ${upgrades if upgrades else "pass"} | ||
| 24 | |||
| 25 | |||
| 26 | def downgrade() -> None: | ||
| 27 | """Downgrade schema.""" | ||
| 28 | ${downgrades if downgrades else "pass"} | ||
