1
0
forked from ScoDoc/ScoDoc
ScoDoc/migrations/versions/dbb4a0b19dbb_association_ue_parcours.py

35 lines
1000 B
Python

"""Association UE/Parcours
Revision ID: dbb4a0b19dbb
Revises: 6bc3f51154b4
Create Date: 2022-10-29 19:06:12.897905
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "dbb4a0b19dbb"
down_revision = "6bc3f51154b4"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column("notes_ue", sa.Column("parcour_id", sa.Integer(), nullable=True))
op.create_index(
op.f("ix_notes_ue_parcour_id"), "notes_ue", ["parcour_id"], unique=False
)
op.create_foreign_key(None, "notes_ue", "apc_parcours", ["parcour_id"], ["id"])
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, "notes_ue", type_="foreignkey")
op.drop_index(op.f("ix_notes_ue_parcour_id"), table_name="notes_ue")
op.drop_column("notes_ue", "parcour_id")
# ### end Alembic commands ###