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

32 lines
927 B
Python
Raw Normal View History

2020-05-07 22:40:20 +02:00
"""empty message
2020-05-09 18:34:34 +02:00
Revision ID: a3a7c518ea70
Revises: bdf76f4b65a2
Create Date: 2020-05-09 18:33:49.991172
2020-05-07 22:40:20 +02:00
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
2020-05-09 18:34:34 +02:00
revision = 'a3a7c518ea70'
down_revision = 'bdf76f4b65a2'
2020-05-07 22:40:20 +02:00
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('deleted_alias_user_id_fkey', 'deleted_alias', type_='foreignkey')
op.drop_column('deleted_alias', 'user_id')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('deleted_alias', sa.Column('user_id', sa.INTEGER(), autoincrement=False, nullable=False))
op.create_foreign_key('deleted_alias_user_id_fkey', 'deleted_alias', 'users', ['user_id'], ['id'], ondelete='CASCADE')
# ### end Alembic commands ###