politikorama/migrations/versions/b83b29dc60b0_.py

31 lines
835 B
Python

"""empty message
Revision ID: b83b29dc60b0
Revises: 8b260b23ba3a
Create Date: 2021-07-21 14:04:54.107335
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'b83b29dc60b0'
down_revision = '8b260b23ba3a'
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint('representative_slug_key', 'representative', type_='unique')
op.create_unique_constraint(None, 'representative', ['code'])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'representative', type_='unique')
op.create_unique_constraint('representative_slug_key', 'representative', ['slug'])
# ### end Alembic commands ###