2019-09-16 14:19:21 +02:00
|
|
|
"""add 'weekm' in 'User' table
|
2019-08-31 16:33:46 +02:00
|
|
|
|
|
|
|
Revision ID: 27425324c9e3
|
|
|
|
Revises: 096dd0b43beb
|
|
|
|
Create Date: 2019-08-31 15:25:09.412426
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = '27425324c9e3'
|
|
|
|
down_revision = '096dd0b43beb'
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
op.add_column('users', sa.Column('weekm', sa.Boolean(create_constraint=50), nullable=True))
|
|
|
|
op.execute("UPDATE users SET weekm = false")
|
|
|
|
op.alter_column('users', 'weekm', nullable=False)
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_column('users', 'weekm')
|
|
|
|
# ### end Alembic commands ###
|