aboutsummaryrefslogtreecommitdiff
path: root/migrations/versions/48f561c0ce6_add_column_entry_id.py
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-03 19:23:39 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2016-02-03 19:23:39 +0100
commita065a2c873e80ea933b5cb6ef542ad7a759714e1 (patch)
tree0b2f3e61764afc8589187383d7751bf84181650e /migrations/versions/48f561c0ce6_add_column_entry_id.py
parentalembic patch (diff)
downloadnewspipe-a065a2c873e80ea933b5cb6ef542ad7a759714e1.tar.gz
newspipe-a065a2c873e80ea933b5cb6ef542ad7a759714e1.tar.bz2
newspipe-a065a2c873e80ea933b5cb6ef542ad7a759714e1.zip
carpy tests for alembic...
Diffstat (limited to 'migrations/versions/48f561c0ce6_add_column_entry_id.py')
-rw-r--r--migrations/versions/48f561c0ce6_add_column_entry_id.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/migrations/versions/48f561c0ce6_add_column_entry_id.py b/migrations/versions/48f561c0ce6_add_column_entry_id.py
new file mode 100644
index 00000000..f464849a
--- /dev/null
+++ b/migrations/versions/48f561c0ce6_add_column_entry_id.py
@@ -0,0 +1,26 @@
+"""add column entry_id
+
+Revision ID: 48f561c0ce6
+Revises:
+Create Date: 2015-02-18 21:17:19.346998
+
+"""
+
+# revision identifiers, used by Alembic.
+revision = '48f561c0ce6'
+down_revision = None
+branch_labels = None
+depends_on = None
+
+import conf
+from alembic import op
+import sqlalchemy as sa
+
+
+def upgrade():
+ op.add_column('article', sa.Column('entry_id', sa.String(), nullable=True))
+
+
+def downgrade():
+ if 'sqlite' not in conf.SQLALCHEMY_DATABASE_URI:
+ op.drop_column('article', 'entry_id')
bgstack15