aboutsummaryrefslogtreecommitdiff
path: root/migrations/versions
diff options
context:
space:
mode:
Diffstat (limited to 'migrations/versions')
-rw-r--r--migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py b/migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py
new file mode 100644
index 00000000..f9559fe3
--- /dev/null
+++ b/migrations/versions/2c5cc05216fa_adding_tag_handling_capacities.py
@@ -0,0 +1,30 @@
+"""adding tag handling capacities
+
+Revision ID: 2c5cc05216fa
+Revises: be2b8b6f33dd
+Create Date: 2016-11-08 07:41:13.923531
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '2c5cc05216fa'
+down_revision = 'be2b8b6f33dd'
+branch_labels = None
+depends_on = None
+
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ op.create_table('tag',
+ sa.Column('text', sa.String(), nullable=False),
+ sa.Column('article_id', sa.Integer(), nullable=False),
+ sa.ForeignKeyConstraint(['article_id'], ['article.id'],
+ ondelete='CASCADE'),
+ sa.PrimaryKeyConstraint('text', 'article_id')
+ )
+
+
+def downgrade():
+ op.drop_table('tag')
bgstack15