Skip to content

Commit

Permalink
db migration script
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng committed Dec 8, 2024
1 parent 40fde38 commit ccf11f3
Showing 1 changed file with 33 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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 ###

0 comments on commit ccf11f3

Please sign in to comment.