mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
fix: production blocked because having existing meeting with room_id null (#657)
This commit is contained in:
@@ -8,7 +8,6 @@ Create Date: 2025-09-10 10:47:06.006819
|
|||||||
|
|
||||||
from typing import Sequence, Union
|
from typing import Sequence, Union
|
||||||
|
|
||||||
import sqlalchemy as sa
|
|
||||||
from alembic import op
|
from alembic import op
|
||||||
|
|
||||||
# revision identifiers, used by Alembic.
|
# revision identifiers, used by Alembic.
|
||||||
@@ -21,7 +20,6 @@ depends_on: Union[str, Sequence[str], None] = None
|
|||||||
def upgrade() -> None:
|
def upgrade() -> None:
|
||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
||||||
batch_op.alter_column("room_id", existing_type=sa.VARCHAR(), nullable=False)
|
|
||||||
batch_op.create_foreign_key(
|
batch_op.create_foreign_key(
|
||||||
None, "room", ["room_id"], ["id"], ondelete="CASCADE"
|
None, "room", ["room_id"], ["id"], ondelete="CASCADE"
|
||||||
)
|
)
|
||||||
@@ -33,6 +31,5 @@ def downgrade() -> None:
|
|||||||
# ### commands auto generated by Alembic - please adjust! ###
|
# ### commands auto generated by Alembic - please adjust! ###
|
||||||
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
||||||
batch_op.drop_constraint("meeting_room_id_fkey", type_="foreignkey")
|
batch_op.drop_constraint("meeting_room_id_fkey", type_="foreignkey")
|
||||||
batch_op.alter_column("room_id", existing_type=sa.VARCHAR(), nullable=True)
|
|
||||||
|
|
||||||
# ### end Alembic commands ###
|
# ### end Alembic commands ###
|
||||||
|
|||||||
Reference in New Issue
Block a user