Skip to content

Commit

Permalink
new revision
Browse files Browse the repository at this point in the history
  • Loading branch information
ychiucco committed Jan 30, 2025
1 parent 298be27 commit a622024
Showing 1 changed file with 54 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
"""drop old filter columns
Revision ID: af8673379a5c
Revises: db09233ad13a
Create Date: 2025-01-30 14:44:04.302795
"""
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = "af8673379a5c"
down_revision = "db09233ad13a"
branch_labels = None
depends_on = None


def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("datasetv2", schema=None) as batch_op:
batch_op.drop_column("filters")

with op.batch_alter_table("workflowtaskv2", schema=None) as batch_op:
batch_op.drop_column("input_filters")

# ### end Alembic commands ###


def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
with op.batch_alter_table("workflowtaskv2", schema=None) as batch_op:
batch_op.add_column(
sa.Column(
"input_filters",
postgresql.JSON(astext_type=sa.Text()),
server_default=sa.text("'null'::json"),
autoincrement=False,
nullable=True,
)
)

with op.batch_alter_table("datasetv2", schema=None) as batch_op:
batch_op.add_column(
sa.Column(
"filters",
postgresql.JSON(astext_type=sa.Text()),
server_default=sa.text("'null'::json"),
autoincrement=False,
nullable=True,
)
)

# ### end Alembic commands ###

0 comments on commit a622024

Please sign in to comment.