mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 12:19:06 +00:00
55 lines
1.6 KiB
Python
55 lines
1.6 KiB
Python
"""dailyco platform
|
|
|
|
Revision ID: 7e47155afd51
|
|
Revises: b7df9609542c
|
|
Create Date: 2025-08-04 11:14:19.663115
|
|
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = "7e47155afd51"
|
|
down_revision: Union[str, None] = "b7df9609542c"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
|
batch_op.add_column(
|
|
sa.Column("platform", sa.String(), server_default="whereby", nullable=False)
|
|
)
|
|
batch_op.drop_index(
|
|
batch_op.f("idx_one_active_meeting_per_room"),
|
|
sqlite_where=sa.text("is_active = 1"),
|
|
)
|
|
|
|
with op.batch_alter_table("room", schema=None) as batch_op:
|
|
batch_op.add_column(
|
|
sa.Column("platform", sa.String(), server_default="whereby", nullable=False)
|
|
)
|
|
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
with op.batch_alter_table("room", schema=None) as batch_op:
|
|
batch_op.drop_column("platform")
|
|
|
|
with op.batch_alter_table("meeting", schema=None) as batch_op:
|
|
batch_op.create_index(
|
|
batch_op.f("idx_one_active_meeting_per_room"),
|
|
["room_id"],
|
|
unique=1,
|
|
sqlite_where=sa.text("is_active = 1"),
|
|
)
|
|
batch_op.drop_column("platform")
|
|
|
|
# ### end Alembic commands ###
|