app-MAIL-temp/migrations/versions/5fa68bafae72_.py
2019-12-15 18:55:13 +02:00

40 lines
1.3 KiB
Python

"""empty message
Revision ID: 5fa68bafae72
Revises: c79c702a1f23
Create Date: 2019-11-07 17:32:32.358891
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '5fa68bafae72'
down_revision = 'c79c702a1f23'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('forward_email',
sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
sa.Column('created_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=False),
sa.Column('updated_at', sqlalchemy_utils.types.arrow.ArrowType(), nullable=True),
sa.Column('gen_email_id', sa.Integer(), nullable=False),
sa.Column('website_email', sa.String(length=128), nullable=False),
sa.Column('reply_email', sa.String(length=128), nullable=False),
sa.ForeignKeyConstraint(['gen_email_id'], ['gen_email.id'], ondelete='cascade'),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('gen_email_id', 'website_email', name='uq_forward_email')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('forward_email')
# ### end Alembic commands ###