From ccf11f3a0518176cc40c2d249291a71e49f05141 Mon Sep 17 00:00:00 2001 From: Shuchang Zheng Date: Sat, 7 Dec 2024 21:32:39 -0800 Subject: [PATCH] db migration script --- ...add_prompt_and_url_to_observer_cruises_.py | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 alembic/versions/2024_12_08_0532-dc2a8facf0d7_add_prompt_and_url_to_observer_cruises_.py diff --git a/alembic/versions/2024_12_08_0532-dc2a8facf0d7_add_prompt_and_url_to_observer_cruises_.py b/alembic/versions/2024_12_08_0532-dc2a8facf0d7_add_prompt_and_url_to_observer_cruises_.py new file mode 100644 index 000000000..781d72d5d --- /dev/null +++ b/alembic/versions/2024_12_08_0532-dc2a8facf0d7_add_prompt_and_url_to_observer_cruises_.py @@ -0,0 +1,33 @@ +"""add prompt and url to observer_cruises table + +Revision ID: dc2a8facf0d7 +Revises: 8069e38dc1b4 +Create Date: 2024-12-08 05:32:21.240122+00:00 + +""" + +from typing import Sequence, Union + +import sqlalchemy as sa + +from alembic import op + +# revision identifiers, used by Alembic. +revision: str = "dc2a8facf0d7" +down_revision: Union[str, None] = "8069e38dc1b4" +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! ### + op.add_column("observer_cruises", sa.Column("prompt", sa.UnicodeText(), nullable=True)) + op.add_column("observer_cruises", sa.Column("url", sa.String(), nullable=True)) + # ### end Alembic commands ### + + +def downgrade() -> None: + # ### commands auto generated by Alembic - please adjust! ### + op.drop_column("observer_cruises", "url") + op.drop_column("observer_cruises", "prompt") + # ### end Alembic commands ###