aboutsummaryrefslogtreecommitdiff
path: root/migrations
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-06-11 23:38:03 +0100
committerrubenwardy <rw@rubenwardy.com>2018-06-11 23:39:41 +0100
commit68b7a5e922472202599ae598cc490865ef20bbb0 (patch)
treee1c5cd8565ea86929fd3f22537800c6bd827fdba /migrations
parente8cc685f896f65bb3b35bf360f78151eb53ddc8c (diff)
downloadcheatdb-68b7a5e922472202599ae598cc490865ef20bbb0.tar.xz
Add thread watchers
Diffstat (limited to 'migrations')
-rw-r--r--migrations/versions/de004661c5e1_.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/migrations/versions/de004661c5e1_.py b/migrations/versions/de004661c5e1_.py
new file mode 100644
index 0000000..73b5880
--- /dev/null
+++ b/migrations/versions/de004661c5e1_.py
@@ -0,0 +1,34 @@
+"""empty message
+
+Revision ID: de004661c5e1
+Revises: 605b3d74ada1
+Create Date: 2018-06-11 23:38:38.611039
+
+"""
+from alembic import op
+import sqlalchemy as sa
+
+
+# revision identifiers, used by Alembic.
+revision = 'de004661c5e1'
+down_revision = '605b3d74ada1'
+branch_labels = None
+depends_on = None
+
+
+def upgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.create_table('watchers',
+ sa.Column('user_id', sa.Integer(), nullable=False),
+ sa.Column('thread_id', sa.Integer(), nullable=False),
+ sa.ForeignKeyConstraint(['thread_id'], ['thread.id'], ),
+ sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
+ sa.PrimaryKeyConstraint('user_id', 'thread_id')
+ )
+ # ### end Alembic commands ###
+
+
+def downgrade():
+ # ### commands auto generated by Alembic - please adjust! ###
+ op.drop_table('watchers')
+ # ### end Alembic commands ###