mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 09:50:38 +01:00
41 lines
1.3 KiB
Python
41 lines
1.3 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: 5f191273d067
|
||
|
Revises: 75093e7ded27
|
||
|
Create Date: 2020-02-28 19:08:15.570326
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '5f191273d067'
|
||
|
down_revision = '75093e7ded27'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('account_activation',
|
||
|
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('code', sa.String(length=10), nullable=False),
|
||
|
sa.Column('tries', sa.Integer(), nullable=False),
|
||
|
sa.CheckConstraint('tries >= 0', name='account_activation_tries_positive'),
|
||
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
||
|
sa.PrimaryKeyConstraint('id'),
|
||
|
sa.UniqueConstraint('user_id')
|
||
|
)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('account_activation')
|
||
|
# ### end Alembic commands ###
|