|
@@ -15,10 +15,12 @@ import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
- ### commands auto generated by Alembic - please adjust! ###
|
|
|
- op.add_column('users', sa.Column('activated', sa.Boolean(), nullable=True))
|
|
|
- op.add_column('users', sa.Column('last_failed_login', sa.DateTime(), nullable=True))
|
|
|
- op.add_column('users', sa.Column('login_attempts', sa.Integer(), nullable=True))
|
|
|
+ # has no effect on other DBMS
|
|
|
+ # read here for more info: http://alembic.zzzcomputing.com/en/latest/ops.html#alembic.operations.Operations.batch_alter_table
|
|
|
+ with op.batch_alter_table('users', schema=None) as batch_op:
|
|
|
+ batch_op.add_column(sa.Column('activated', sa.Boolean(), nullable=True))
|
|
|
+ batch_op.add_column(sa.Column('last_failed_login', sa.DateTime(), nullable=True))
|
|
|
+ batch_op.add_column(sa.Column('login_attempts', sa.Integer(), nullable=True))
|
|
|
### end Alembic commands ###
|
|
|
|
|
|
|