From cf64e1a3d91398b066e670dc7f7966eb2c656d31 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Tue, 2 Sep 2025 16:10:11 -0600 Subject: [PATCH] feat: add database migration for platform field MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Generate Alembic migration to add platform column to rooms and meetings tables enabling multi-platform video conferencing support. - Add platform column to meeting table with whereby default - Add platform column to room table with whereby default - Migration tested successfully with alembic upgrade head 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- ...dd_platform_field_to_rooms_and_meetings.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 server/migrations/versions/35e035defa85_add_platform_field_to_rooms_and_meetings.py diff --git a/server/migrations/versions/35e035defa85_add_platform_field_to_rooms_and_meetings.py b/server/migrations/versions/35e035defa85_add_platform_field_to_rooms_and_meetings.py new file mode 100644 index 00000000..7ca03651 --- /dev/null +++ b/server/migrations/versions/35e035defa85_add_platform_field_to_rooms_and_meetings.py @@ -0,0 +1,44 @@ +"""Add platform field to rooms and meetings + +Revision ID: 35e035defa85 +Revises: 61882a919591 +Create Date: 2025-09-02 16:08:55.205173 + +""" + +from typing import Sequence, Union + +import sqlalchemy as sa +from alembic import op + +# revision identifiers, used by Alembic. +revision: str = "35e035defa85" +down_revision: Union[str, None] = "61882a919591" +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) + ) + + 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.drop_column("platform") + + # ### end Alembic commands ###