ScoDocMM/migrations/versions/ee21c76c8183_fix_contrainte_refcomp.py

38 lines
993 B
Python
Raw Normal View History

2022-07-05 16:09:26 +02:00
"""Corrige contrainte unicité référentiel compétences
Revision ID: ee21c76c8183
Revises: c0c225192d61
Create Date: 2022-06-27 20:18:24.822527
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "ee21c76c8183"
down_revision = "c0c225192d61"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index("ix_apc_competence_id_orebut", table_name="apc_competence")
op.create_index(
op.f("ix_apc_competence_id_orebut"),
"apc_competence",
["id_orebut"],
unique=False,
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(op.f("ix_apc_competence_id_orebut"), table_name="apc_competence")
op.create_index(
"ix_apc_competence_id_orebut", "apc_competence", ["id_orebut"], unique=False
)
# ### end Alembic commands ###