"""add_uniq_constraint_to_gras_project_artist Revision ID: 7f20f7366fb9 Revises: 66b1d16db276 Create Date: 2021-03-15 11:41:20.931759 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '7f20f7366fb9' down_revision = '81ba9760458d' branch_labels = None depends_on = None def upgrade(): op.create_unique_constraint( op.f('uq_GRASProjectArtist_gras_project_id_artist_id'), 'GRASProjectArtist', ['gras_project_id', 'artist_id'] ) def downgrade(): op.drop_constraint(op.f('uq_GRASProjectArtist_gras_project_id_artist_id'), 'GRASProjectArtist', type_='unique')