mirror of
https://github.com/simple-login/app.git
synced 2024-11-18 01:40:38 +01:00
32 lines
857 B
Python
32 lines
857 B
Python
|
"""empty message
|
||
|
|
||
|
Revision ID: 4e4a759ac4b5
|
||
|
Revises: dbd80d290f04
|
||
|
Create Date: 2020-03-20 12:12:45.699045
|
||
|
|
||
|
"""
|
||
|
import sqlalchemy_utils
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = '4e4a759ac4b5'
|
||
|
down_revision = 'dbd80d290f04'
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.add_column('alias_used_on', sa.Column('user_id', sa.Integer(), nullable=True))
|
||
|
op.create_foreign_key(None, 'alias_used_on', 'users', ['user_id'], ['id'], ondelete='cascade')
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_constraint(None, 'alias_used_on', type_='foreignkey')
|
||
|
op.drop_column('alias_used_on', 'user_id')
|
||
|
# ### end Alembic commands ###
|