diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-04-04 23:33:22 +0200 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2018-04-04 23:33:22 +0200 |
commit | d809ead39a0ca80dd859af3809d0da710804cb0b (patch) | |
tree | 9a89c00b3a71ea905f589566e175e8de21ca7a65 /migrations/versions | |
parent | Removed email field. (diff) | |
download | newspipe-d809ead39a0ca80dd859af3809d0da710804cb0b.tar.gz newspipe-d809ead39a0ca80dd859af3809d0da710804cb0b.tar.bz2 newspipe-d809ead39a0ca80dd859af3809d0da710804cb0b.zip |
added migration script
Diffstat (limited to 'migrations/versions')
-rw-r--r-- | migrations/versions/bdd38bd755cb_remove_email_attribute_from_users_.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/migrations/versions/bdd38bd755cb_remove_email_attribute_from_users_.py b/migrations/versions/bdd38bd755cb_remove_email_attribute_from_users_.py new file mode 100644 index 00000000..a4d24ff5 --- /dev/null +++ b/migrations/versions/bdd38bd755cb_remove_email_attribute_from_users_.py @@ -0,0 +1,25 @@ +"""remove email attribute from users objects + +Revision ID: bdd38bd755cb +Revises: b329a1a7366f +Create Date: 2018-04-04 23:26:52.517804 + +""" + +# revision identifiers, used by Alembic. +revision = 'bdd38bd755cb' +down_revision = 'b329a1a7366f' +branch_labels = None +depends_on = None + +from alembic import op +import sqlalchemy as sa + + +def upgrade(): + op.drop_column('user', 'email') + + +def downgrade(): + op.add_column('user', sa.Column('email', sa.String(254), unique=True, + index=True)) |