aboutsummaryrefslogtreecommitdiffstats
path: root/thallium-backend/migrations/script.py.mako
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-08-16 19:03:48 +0100
committerGravatar Chris Lovering <[email protected]>2024-08-16 19:05:30 +0100
commit3dfabc121e00bec538ab2b7d6d1d258bd6b6b5a4 (patch)
treee173cbff10eaa6617533ca42676003e63a94a2c7 /thallium-backend/migrations/script.py.mako
parentAdd volume for thallium-backend (diff)
Add a database backend and migrations
Diffstat (limited to 'thallium-backend/migrations/script.py.mako')
-rw-r--r--thallium-backend/migrations/script.py.mako27
1 files changed, 27 insertions, 0 deletions
diff --git a/thallium-backend/migrations/script.py.mako b/thallium-backend/migrations/script.py.mako
new file mode 100644
index 0000000..1d3e1aa
--- /dev/null
+++ b/thallium-backend/migrations/script.py.mako
@@ -0,0 +1,27 @@
+"""
+${message}
+
+Revision ID: ${up_revision}
+Revises: ${down_revision | comma,n}
+Create Date: ${create_date}
+"""
+import sqlalchemy as sa
+from alembic import op
+
+${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() -> None:
+ """Apply this migration."""
+ ${upgrades if upgrades else "pass"}
+
+
+def downgrade() -> None:
+ """Revert this migration."""
+ ${downgrades if downgrades else "pass"}