Skip to content

Commit

Permalink
add missing migration file
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsachs committed Dec 18, 2024
1 parent bfb72cf commit 677c322
Showing 1 changed file with 38 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""staged resource web monitor updates
Revision ID: 58f8edd66b69
Revises: c90d46f6d3f2
Create Date: 2024-12-17 19:25:36.184841
"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '58f8edd66b69'
down_revision = 'c90d46f6d3f2'
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'])
# ### 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')
# ### end Alembic commands ###

0 comments on commit 677c322

Please sign in to comment.