app-MAIL-temp/migrations/versions/2021_012609_74906d31d994_.py

47 lines
1.5 KiB
Python
Raw Normal View History

"""empty message
Revision ID: 74906d31d994
Revises: 2779eb90c6c4
Create Date: 2021-01-26 09:53:58.010247
"""
import sqlalchemy_utils
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '74906d31d994'
down_revision = '2779eb90c6c4'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_table('bounce',
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('email', sa.String(length=256), nullable=False),
sa.PrimaryKeyConstraint('id')
)
op.create_index(op.f('ix_bounce_email'), 'bounce', ['email'], unique=False)
op.create_table('transactional_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('email', sa.String(length=256), nullable=False),
sa.PrimaryKeyConstraint('id'),
sa.UniqueConstraint('email')
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_table('transactional_email')
op.drop_index(op.f('ix_bounce_email'), table_name='bounce')
op.drop_table('bounce')
# ### end Alembic commands ###