1234567891011121314151617181920212223242526272829303132 |
- """Add user authentication infos
- Revision ID: 221d918aa9f0
- Revises: 127be3fb000
- Create Date: 2016-06-06 13:45:52.915050
- """
- # revision identifiers, used by Alembic.
- revision = '221d918aa9f0'
- down_revision = '127be3fb000'
- from alembic import op
- import sqlalchemy as sa
- def upgrade():
- # 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 ###
- def downgrade():
- ### commands auto generated by Alembic - please adjust! ###
- op.drop_column('users', 'activated')
- op.drop_column('users', 'login_attempts')
- op.drop_column('users', 'last_failed_login')
- ### end Alembic commands ###
|