From 1c8f4f7e9c1163321bfc5ff6592341531e58b609 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch <p.jentsch@uni-bielefeld.de>
Date: Tue, 4 Oct 2022 15:33:22 +0200
Subject: [PATCH] Add is_public column to corpora db table

---
 migrations/versions/2c4e27331ccb_.py | 29 ++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 migrations/versions/2c4e27331ccb_.py

diff --git a/migrations/versions/2c4e27331ccb_.py b/migrations/versions/2c4e27331ccb_.py
new file mode 100644
index 00000000..302c6670
--- /dev/null
+++ b/migrations/versions/2c4e27331ccb_.py
@@ -0,0 +1,29 @@
+"""Add is_public column to corpora table
+
+Revision ID: 2c4e27331ccb
+Revises: 116b4ab3ef9c
+Create Date: 2022-09-28 13:48:26.218643
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = '2c4e27331ccb'
+down_revision = '116b4ab3ef9c'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+    # ### commands auto generated by Alembic - please adjust! ###
+    op.add_column('corpora', sa.Column('is_public', sa.Boolean(), nullable=True))
+    op.execute('UPDATE corpora SET is_public = false;')
+    # ### end Alembic commands ###
+
+
+def downgrade():
+    # ### commands auto generated by Alembic - please adjust! ###
+    op.drop_column('corpora', 'is_public')
+    # ### end Alembic commands ###
-- 
GitLab