university-final-iot-backend/migrations/versions/ae43d7caad52_.py

38 lines
974 B
Python
Raw Normal View History

2018-10-10 19:07:27 +00:00
"""empty message
Revision ID: ae43d7caad52
Revises: fd5cfe0f1c51
Create Date: 2018-10-10 21:01:06.071591
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ae43d7caad52'
down_revision = 'fd5cfe0f1c51'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
accounts = sa.table('accounts', sa.column('id', sa.Integer),
sa.column('confirmed', sa.BOOLEAN()))
op.execute(accounts.update().
values({'confirmed': True}))
op.alter_column('accounts', 'confirmed',
existing_type=sa.BOOLEAN(),
nullable=False)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('accounts', 'confirmed',
existing_type=sa.BOOLEAN(),
nullable=True)
# ### end Alembic commands ###