2021-11-08 19:44:25 +01:00
|
|
|
"""BUT: poids evaluations, AC
|
|
|
|
|
|
|
|
Revision ID: ada0d1f3d84f
|
2021-11-09 22:39:04 +01:00
|
|
|
Revises: 1efe07413835
|
2021-11-08 19:44:25 +01:00
|
|
|
Create Date: 2021-11-07 22:49:22.697211
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = "ada0d1f3d84f"
|
2021-11-09 22:39:04 +01:00
|
|
|
down_revision = "1efe07413835"
|
2021-11-08 19:44:25 +01:00
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.create_table(
|
|
|
|
"app_crit",
|
|
|
|
sa.Column("id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("code", sa.Text(), nullable=False),
|
|
|
|
sa.Column("titre", sa.Text(), nullable=True),
|
|
|
|
sa.PrimaryKeyConstraint("id"),
|
|
|
|
)
|
|
|
|
op.create_table(
|
|
|
|
"modules_acs",
|
|
|
|
sa.Column("module_id", sa.Integer(), nullable=True),
|
|
|
|
sa.Column("ac_id", sa.Integer(), nullable=True),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["ac_id"],
|
|
|
|
["app_crit.id"],
|
|
|
|
),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["module_id"],
|
|
|
|
["notes_modules.id"],
|
|
|
|
),
|
|
|
|
)
|
|
|
|
op.create_table(
|
|
|
|
"evaluation_ue_poids",
|
|
|
|
sa.Column("evaluation_id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("ue_id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("poids", sa.Float(), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["evaluation_id"],
|
|
|
|
["notes_evaluation.id"],
|
|
|
|
),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["ue_id"],
|
|
|
|
["notes_ue.id"],
|
|
|
|
),
|
|
|
|
sa.PrimaryKeyConstraint("evaluation_id", "ue_id"),
|
|
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.drop_table("evaluation_ue_poids")
|
|
|
|
op.drop_table("modules_acs")
|
|
|
|
op.drop_table("app_crit")
|
|
|
|
# ### end Alembic commands ###
|