1
0
forked from ScoDoc/ScoDoc
ScoDoc/migrations/versions/4f98a8b02c89_index_in_formsemestreinscription.py

57 lines
1.5 KiB
Python
Raw Normal View History

"""index in FormSemestreInscription
Revision ID: 4f98a8b02c89
Revises: a57a6ee2e3cb
Create Date: 2021-12-14 16:56:11.034680
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "4f98a8b02c89"
down_revision = "a57a6ee2e3cb"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.create_index(
op.f("ix_notes_formsemestre_inscription_etat"),
"notes_formsemestre_inscription",
["etat"],
unique=False,
)
op.create_index(
op.f("ix_notes_formsemestre_inscription_etudid"),
"notes_formsemestre_inscription",
["etudid"],
unique=False,
)
op.create_index(
op.f("ix_notes_formsemestre_inscription_formsemestre_id"),
"notes_formsemestre_inscription",
["formsemestre_id"],
unique=False,
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index(
op.f("ix_notes_formsemestre_inscription_formsemestre_id"),
table_name="notes_formsemestre_inscription",
)
op.drop_index(
op.f("ix_notes_formsemestre_inscription_etudid"),
table_name="notes_formsemestre_inscription",
)
op.drop_index(
op.f("ix_notes_formsemestre_inscription_etat"),
table_name="notes_formsemestre_inscription",
)
# ### end Alembic commands ###