diff --git a/src/fides/api/alembic/migrations/versions/58f8edd66b69_staged_resource_web_monitor_updates.py b/src/fides/api/alembic/migrations/versions/58f8edd66b69_staged_resource_web_monitor_updates.py index 531e368fa5..51112ab998 100644 --- a/src/fides/api/alembic/migrations/versions/58f8edd66b69_staged_resource_web_monitor_updates.py +++ b/src/fides/api/alembic/migrations/versions/58f8edd66b69_staged_resource_web_monitor_updates.py @@ -1,38 +1,55 @@ """staged resource web monitor updates Revision ID: 58f8edd66b69 -Revises: c90d46f6d3f2 +Revises: ae65da77c468 Create Date: 2024-12-17 19:25:36.184841 """ -from alembic import op -import sqlalchemy as sa +import sqlalchemy as sa +from alembic import op # revision identifiers, used by Alembic. -revision = '58f8edd66b69' -down_revision = 'c90d46f6d3f2' +revision = "58f8edd66b69" +down_revision = "ae65da77c468" branch_labels = None depends_on = None def upgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.add_column('stagedresource', sa.Column('system_id', sa.String(), nullable=True)) - op.add_column('stagedresource', sa.Column('vendor_id', sa.String(), nullable=True)) - op.create_index(op.f('ix_stagedresource_monitor_config_id'), 'stagedresource', ['monitor_config_id'], unique=False) - op.create_index(op.f('ix_stagedresource_system_id'), 'stagedresource', ['system_id'], unique=False) - op.create_index(op.f('ix_stagedresource_vendor_id'), 'stagedresource', ['vendor_id'], unique=False) - op.create_foreign_key(None, 'stagedresource', 'ctl_systems', ['system_id'], ['id']) + op.add_column("stagedresource", sa.Column("system_id", sa.String(), nullable=True)) + op.add_column("stagedresource", sa.Column("vendor_id", sa.String(), nullable=True)) + op.create_index( + op.f("ix_stagedresource_monitor_config_id"), + "stagedresource", + ["monitor_config_id"], + unique=False, + ) + op.create_index( + op.f("ix_stagedresource_system_id"), + "stagedresource", + ["system_id"], + unique=False, + ) + op.create_index( + op.f("ix_stagedresource_vendor_id"), + "stagedresource", + ["vendor_id"], + unique=False, + ) + op.create_foreign_key(None, "stagedresource", "ctl_systems", ["system_id"], ["id"]) # ### end Alembic commands ### def downgrade(): # ### commands auto generated by Alembic - please adjust! ### - op.drop_constraint(None, 'stagedresource', type_='foreignkey') - op.drop_index(op.f('ix_stagedresource_vendor_id'), table_name='stagedresource') - op.drop_index(op.f('ix_stagedresource_system_id'), table_name='stagedresource') - op.drop_index(op.f('ix_stagedresource_monitor_config_id'), table_name='stagedresource') - op.drop_column('stagedresource', 'vendor_id') - op.drop_column('stagedresource', 'system_id') + op.drop_constraint(None, "stagedresource", type_="foreignkey") + op.drop_index(op.f("ix_stagedresource_vendor_id"), table_name="stagedresource") + op.drop_index(op.f("ix_stagedresource_system_id"), table_name="stagedresource") + op.drop_index( + op.f("ix_stagedresource_monitor_config_id"), table_name="stagedresource" + ) + op.drop_column("stagedresource", "vendor_id") + op.drop_column("stagedresource", "system_id") # ### end Alembic commands ###