34 lines
981 B
Python
34 lines
981 B
Python
"""empty message
|
|
|
|
Revision ID: 3ff44646ff95
|
|
Revises: ffa75d04e6ef
|
|
Create Date: 2021-08-04 08:57:00.946968
|
|
|
|
"""
|
|
import sqlalchemy_utils
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '3ff44646ff95'
|
|
down_revision = 'ffa75d04e6ef'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_index(op.f('ix_alias_email'), 'alias', ['email'], unique=True)
|
|
op.create_index(op.f('ix_alias_name'), 'alias', ['name'], unique=False)
|
|
op.drop_constraint('gen_email_email_key', 'alias', type_='unique')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_unique_constraint('gen_email_email_key', 'alias', ['email'])
|
|
op.drop_index(op.f('ix_alias_name'), table_name='alias')
|
|
op.drop_index(op.f('ix_alias_email'), table_name='alias')
|
|
# ### end Alembic commands ###
|