app-MAIL-temp/migrations/versions/2020_062513_a3c9a43e41f4_.py
2020-06-25 13:05:37 +02:00

32 lines
882 B
Python

"""empty message
Revision ID: a3c9a43e41f4
Revises: a5b4dc311a89
Create Date: 2020-06-25 13:02:21.128994
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'a3c9a43e41f4'
down_revision = 'a5b4dc311a89'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('users', sa.Column('default_random_alias_domain_id', sa.Integer(), nullable=True))
op.create_foreign_key(None, 'users', 'custom_domain', ['default_random_alias_domain_id'], ['id'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'users', type_='foreignkey')
op.drop_column('users', 'default_random_alias_domain_id')
# ### end Alembic commands ###