forked from ScoDoc/DocScoDoc
65 lines
1.7 KiB
Python
65 lines
1.7 KiB
Python
|
"""refcomp orebut
|
||
|
|
||
|
Revision ID: bd2c1c3d866e
|
||
|
Revises: c95d5a3bf0de
|
||
|
Create Date: 2022-02-12 15:17:42.298699
|
||
|
|
||
|
"""
|
||
|
from alembic import op
|
||
|
import sqlalchemy as sa
|
||
|
from sqlalchemy.dialects import postgresql
|
||
|
|
||
|
# revision identifiers, used by Alembic.
|
||
|
revision = "bd2c1c3d866e"
|
||
|
down_revision = "c95d5a3bf0de"
|
||
|
branch_labels = None
|
||
|
depends_on = None
|
||
|
|
||
|
|
||
|
def upgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
|
||
|
op.create_index(
|
||
|
op.f("ix_notes_formsemestre_uecoef_formsemestre_id"),
|
||
|
"notes_formsemestre_uecoef",
|
||
|
["formsemestre_id"],
|
||
|
unique=False,
|
||
|
)
|
||
|
op.create_index(
|
||
|
op.f("ix_notes_formsemestre_uecoef_ue_id"),
|
||
|
"notes_formsemestre_uecoef",
|
||
|
["ue_id"],
|
||
|
unique=False,
|
||
|
)
|
||
|
op.create_index(
|
||
|
op.f("ix_scolar_formsemestre_validation_is_external"),
|
||
|
"scolar_formsemestre_validation",
|
||
|
["is_external"],
|
||
|
unique=False,
|
||
|
)
|
||
|
# ### end Alembic commands ###
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
# ### commands auto generated by Alembic - please adjust! ###
|
||
|
op.drop_index(
|
||
|
op.f("ix_scolar_formsemestre_validation_is_external"),
|
||
|
table_name="scolar_formsemestre_validation",
|
||
|
)
|
||
|
op.drop_index(
|
||
|
op.f("ix_notes_formsemestre_uecoef_ue_id"),
|
||
|
table_name="notes_formsemestre_uecoef",
|
||
|
)
|
||
|
op.drop_index(
|
||
|
op.f("ix_notes_formsemestre_uecoef_formsemestre_id"),
|
||
|
table_name="notes_formsemestre_uecoef",
|
||
|
)
|
||
|
|
||
|
op.drop_index(op.f("ix_apc_competence_id_orebut"), table_name="apc_competence")
|
||
|
op.create_unique_constraint(
|
||
|
"apc_competence_referentiel_id_titre_key",
|
||
|
"apc_competence",
|
||
|
["referentiel_id", "titre"],
|
||
|
)
|
||
|
# ### end Alembic commands ###
|