1
0
forked from ScoDoc/ScoDoc
ScoDoc-Front/migrations/versions/6002d7d366e5_assoc_ue_niveau.py

35 lines
869 B
Python

"""assoc UE - Niveau
Revision ID: 6002d7d366e5
Revises: af77ca6a89d0
Create Date: 2022-04-26 12:58:32.929910
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = "6002d7d366e5"
down_revision = "af77ca6a89d0"
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"notes_ue", sa.Column("niveau_competence_id", sa.Integer(), nullable=True)
)
op.create_foreign_key(
None, "notes_ue", "apc_niveau", ["niveau_competence_id"], ["id"]
)
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, "notes_ue", type_="foreignkey")
op.drop_column("notes_ue", "niveau_competence_id")
# ### end Alembic commands ###