regenerate migration
This commit is contained in:
parent
93b7ff3d28
commit
eff960b451
|
@ -1,29 +0,0 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: ea50319ea811
|
||||
Revises: 95599239860a
|
||||
Create Date: 2020-05-22 16:49:25.613344
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'ea50319ea811'
|
||||
down_revision = '95599239860a'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.add_column('users', sa.Column('last_otp', sa.String(length=12), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('users', 'last_otp')
|
||||
# ### end Alembic commands ###
|
|
@ -1,8 +1,8 @@
|
|||
"""empty message
|
||||
|
||||
Revision ID: 95599239860a
|
||||
Revises: ce15cf3467b4
|
||||
Create Date: 2020-05-22 16:14:33.704035
|
||||
Revision ID: 10a7947fda6b
|
||||
Revises: f680032cc361
|
||||
Create Date: 2020-05-24 19:53:53.351545
|
||||
|
||||
"""
|
||||
import sqlalchemy_utils
|
||||
|
@ -11,8 +11,8 @@ import sqlalchemy as sa
|
|||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '95599239860a'
|
||||
down_revision = 'ce15cf3467b4'
|
||||
revision = '10a7947fda6b'
|
||||
down_revision = 'f680032cc361'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
@ -27,12 +27,15 @@ def upgrade():
|
|||
sa.Column('token', sa.String(length=64), nullable=False),
|
||||
sa.Column('expires', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
sa.PrimaryKeyConstraint('id'),
|
||||
sa.UniqueConstraint('token')
|
||||
)
|
||||
op.add_column('users', sa.Column('last_otp', sa.String(length=12), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('users', 'last_otp')
|
||||
op.drop_table('mfa_browser')
|
||||
# ### end Alembic commands ###
|
Loading…
Reference in New Issue