2024-08-11 23:24:40 +02:00
|
|
|
"""FormSemestreDescription et capacité d'accueil
|
2024-08-11 21:39:43 +02:00
|
|
|
|
|
|
|
Revision ID: 2640b7686de6
|
|
|
|
Revises: f6cb3d4e44ec
|
|
|
|
Create Date: 2024-08-11 15:44:32.560054
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
|
|
revision = "2640b7686de6"
|
|
|
|
down_revision = "f6cb3d4e44ec"
|
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
op.create_table(
|
|
|
|
"notes_formsemestre_description",
|
|
|
|
sa.Column("id", sa.Integer(), nullable=False),
|
|
|
|
sa.Column("image", sa.LargeBinary(), nullable=True),
|
|
|
|
sa.Column("description", sa.Text(), server_default="", nullable=False),
|
|
|
|
sa.Column("responsable", sa.Text(), server_default="", nullable=False),
|
|
|
|
sa.Column("lieu", sa.Text(), server_default="", nullable=False),
|
|
|
|
sa.Column("horaire", sa.Text(), server_default="", nullable=False),
|
|
|
|
sa.Column("formsemestre_id", sa.Integer(), nullable=False),
|
|
|
|
sa.ForeignKeyConstraint(
|
|
|
|
["formsemestre_id"], ["notes_formsemestre.id"], ondelete="CASCADE"
|
|
|
|
),
|
|
|
|
sa.PrimaryKeyConstraint("id"),
|
|
|
|
)
|
2024-08-11 23:24:40 +02:00
|
|
|
with op.batch_alter_table("notes_formsemestre", schema=None) as batch_op:
|
|
|
|
batch_op.add_column(sa.Column("capacite_accueil", sa.Integer(), nullable=True))
|
2024-08-11 21:39:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
2024-08-11 23:24:40 +02:00
|
|
|
with op.batch_alter_table("notes_formsemestre", schema=None) as batch_op:
|
|
|
|
batch_op.drop_column("capacite_accueil")
|
2024-08-11 21:39:43 +02:00
|
|
|
op.drop_table("notes_formsemestre_description")
|