You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cookie-api/migrations/versions/82595a1e5193_added_confirme...

31 lines
760 B
Python

"""Added confirmed to user
Revision ID: 82595a1e5193
Revises: 227892845cde
Create Date: 2018-01-15 15:34:46.028181
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '82595a1e5193'
down_revision = '227892845cde'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('confirmed', sa.Boolean()))
op.execute('UPDATE users SET confirmed=FALSE')
op.alter_column('users', 'confirmed', nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column('users', 'confirmed')
# ### end Alembic commands ###