From d809ead39a0ca80dd859af3809d0da710804cb0b Mon Sep 17 00:00:00 2001 From: Cédric Bonhomme Date: Wed, 4 Apr 2018 23:33:22 +0200 Subject: added migration script --- ...38bd755cb_remove_email_attribute_from_users_.py | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 migrations/versions/bdd38bd755cb_remove_email_attribute_from_users_.py (limited to 'migrations') 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)) -- cgit