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

32 lines
862 B
Python
Raw Normal View History

2020-09-12 14:34:38 +02:00
"""empty message
Revision ID: b0e9a389939a
Revises: 84471852b610
Create Date: 2020-09-12 11:18:40.262432
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b0e9a389939a'
down_revision = '84471852b610'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('newsletter_alias_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'users', 'alias', ['newsletter_alias_id'], ['id'], ondelete='SET NULL')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'users', type_='foreignkey')
op.drop_column('users', 'newsletter_alias_id')
# ### end Alembic commands ###