forked from ScoDoc/ScoDoc
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
|
"""FormSemestreDescription
|
||
|
|
||
|
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"),
|
||
|
)
|
||
|
|
||
|
|
||
|
def downgrade():
|
||
|
op.drop_table("notes_formsemestre_description")
|