2021-11-09 11:52:41 +01:00
|
|
|
"""added cascade on absences_notifications
|
|
|
|
|
|
|
|
Revision ID: 1efe07413835
|
|
|
|
Revises: 75cf18659984
|
|
|
|
Create Date: 2021-11-09 11:49:31.739803
|
|
|
|
|
|
|
|
"""
|
|
|
|
from alembic import op
|
|
|
|
import sqlalchemy as sa
|
|
|
|
|
|
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
2022-05-09 16:26:23 +02:00
|
|
|
revision = "1efe07413835"
|
|
|
|
down_revision = "75cf18659984"
|
2021-11-09 11:52:41 +01:00
|
|
|
branch_labels = None
|
|
|
|
depends_on = None
|
|
|
|
|
|
|
|
|
|
|
|
def upgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2022-05-09 16:26:23 +02:00
|
|
|
op.drop_constraint(
|
|
|
|
"absences_notifications_formsemestre_id_fkey",
|
|
|
|
"absences_notifications",
|
|
|
|
type_="foreignkey",
|
|
|
|
)
|
|
|
|
op.create_foreign_key(
|
|
|
|
None,
|
|
|
|
"absences_notifications",
|
|
|
|
"notes_formsemestre",
|
|
|
|
["formsemestre_id"],
|
|
|
|
["id"],
|
|
|
|
ondelete="CASCADE",
|
|
|
|
)
|
2021-11-09 11:52:41 +01:00
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
|
|
|
|
|
|
def downgrade():
|
|
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
2022-05-09 16:26:23 +02:00
|
|
|
op.drop_constraint(None, "absences_notifications", type_="foreignkey")
|
|
|
|
op.create_foreign_key(
|
|
|
|
"absences_notifications_formsemestre_id_fkey",
|
|
|
|
"absences_notifications",
|
|
|
|
"notes_formsemestre",
|
|
|
|
["formsemestre_id"],
|
|
|
|
["id"],
|
|
|
|
)
|
2021-11-09 11:52:41 +01:00
|
|
|
# ### end Alembic commands ###
|