mirror of
https://github.com/simple-login/app.git
synced 2025-10-06 05:17:41 +08:00
regenerate migration
This commit is contained in:
parent
93b7ff3d28
commit
eff960b451
2 changed files with 9 additions and 35 deletions
|
@ -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
|
"""empty message
|
||||||
|
|
||||||
Revision ID: 95599239860a
|
Revision ID: 10a7947fda6b
|
||||||
Revises: ce15cf3467b4
|
Revises: f680032cc361
|
||||||
Create Date: 2020-05-22 16:14:33.704035
|
Create Date: 2020-05-24 19:53:53.351545
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import sqlalchemy_utils
|
import sqlalchemy_utils
|
||||||
|
@ -11,8 +11,8 @@ import sqlalchemy as sa
|
||||||
|
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
revision = '95599239860a'
|
revision = '10a7947fda6b'
|
||||||
down_revision = 'ce15cf3467b4'
|
down_revision = 'f680032cc361'
|
||||||
branch_labels = None
|
branch_labels = None
|
||||||
depends_on = None
|
depends_on = None
|
||||||
|
|
||||||
|
@ -27,12 +27,15 @@ def upgrade():
|
||||||
sa.Column('token', sa.String(length=64), nullable=False),
|
sa.Column('token', sa.String(length=64), nullable=False),
|
||||||
sa.Column('expires', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
sa.Column('expires', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||||||
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
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 ###
|
# ### end Alembic commands ###
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
|
op.drop_column('users', 'last_otp')
|
||||||
op.drop_table('mfa_browser')
|
op.drop_table('mfa_browser')
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
Loading…
Add table
Reference in a new issue