app-MAIL-temp/migrations/versions/2020_032012_4e4a759ac4b5_.py

32 lines
857 B
Python
Raw Normal View History

2020-03-20 12:13:00 +01:00
"""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 ###