mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 06:31:27 +08:00
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: 95599239860a
|
||
|
Revises: ce15cf3467b4
|
||
|
Create Date: 2020-05-22 16:14:33.704035
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '95599239860a'
|
||
|
down_revision = 'ce15cf3467b4'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('mfa_browser',
|
||
|
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
|
||
|
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
|
||
|
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
|
||
|
sa.Column('user_id', sa.Integer(), nullable=False),
|
||
|
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')
|
||
|
)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('mfa_browser')
|
||
|
# ### end Alembic commands ###
|