Add Alembic to project for database migrations

This commit is contained in:
Lexi / Zoe 2022-04-15 16:10:38 +02:00
parent 7755bfb46d
commit 7ce43a2bfe
Signed by: binaryDiv
GPG key ID: F8D4956E224DA232
15 changed files with 256 additions and 49 deletions

25
migrations/script.py.mako Normal file
View file

@ -0,0 +1,25 @@
"""
${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
# Revision identifiers, used by Alembic.
revision = ${repr(up_revision)}
down_revision = ${repr(down_revision)}
branch_labels = ${repr(branch_labels)}
depends_on = ${repr(depends_on)}
def upgrade():
${upgrades if upgrades else "pass"}
def downgrade():
${downgrades if downgrades else "pass"}