aboutsummaryrefslogtreecommitdiffstats
path: root/alembic
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-04-07 23:01:58 +0100
committerGravatar Joe Banks <[email protected]>2024-04-07 23:01:58 +0100
commitef0c90848aa293d60ea8dd90033b87a5d375baa8 (patch)
tree9301314a8c80408b6548fca85ff609e9864a1a91 /alembic
parentAdd column for a channel that has been deleted (diff)
Add migration for Channel.deleted column
Diffstat (limited to 'alembic')
-rw-r--r--alembic/versions/c09a64cac3cb_add_deleted_column_to_channel_model.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/alembic/versions/c09a64cac3cb_add_deleted_column_to_channel_model.py b/alembic/versions/c09a64cac3cb_add_deleted_column_to_channel_model.py
new file mode 100644
index 0000000..24f255b
--- /dev/null
+++ b/alembic/versions/c09a64cac3cb_add_deleted_column_to_channel_model.py
@@ -0,0 +1,28 @@
+"""
+Add deleted column to channel model.
+
+Revision ID: c09a64cac3cb
+Revises: 03655ce2097b
+Create Date: 2024-04-07 22:58:53.186355
+
+"""
+
+import sqlalchemy as sa
+
+from alembic import op
+
+# revision identifiers, used by Alembic.
+revision = "c09a64cac3cb"
+down_revision = "03655ce2097b"
+branch_labels = None
+depends_on = None
+
+
+def upgrade() -> None:
+ """Apply the current migration."""
+ op.add_column("channels", sa.Column("deleted", sa.Boolean(), nullable=False, server_default="False", default=False))
+
+
+def downgrade() -> None:
+ """Revert the current migration."""
+ op.drop_column("channels", "deleted")