mirror of
https://github.com/simple-login/app.git
synced 2024-11-16 08:58:30 +01:00
40 lines
1.2 KiB
Python
40 lines
1.2 KiB
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: d68a2d971b70
|
||
|
Revises: 6bbda4685999
|
||
|
Create Date: 2019-11-18 15:08:33.631447
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = 'd68a2d971b70'
|
||
|
down_revision = '6bbda4685999'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.create_table('deleted_alias',
|
||
|
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('email', sa.String(length=128), nullable=False),
|
||
|
sa.ForeignKeyConstraint(['user_id'], ['users.id'], ondelete='cascade'),
|
||
|
sa.PrimaryKeyConstraint('id'),
|
||
|
sa.UniqueConstraint('email'),
|
||
|
sa.UniqueConstraint('user_id')
|
||
|
)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_table('deleted_alias')
|
||
|
# ### end Alembic commands ###
|