"""implement host chains Revision ID: 982867b533e6 Revises: 79271458a973 Create Date: 2024-12-15 04:27:44.704707 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = "982867b533e6" down_revision = "79271458a973" branch_labels = None depends_on = None def upgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.create_table( "host_chains", sa.Column("host_id", sa.Integer(), nullable=False), sa.Column("chained_host_id", sa.Integer(), nullable=True), sa.Column("seq", sa.Integer(), nullable=False), sa.ForeignKeyConstraint( ["chained_host_id"], ["hosts.id"], ), sa.ForeignKeyConstraint( ["host_id"], ["hosts.id"], ), sa.PrimaryKeyConstraint("host_id", "seq"), ) # ### end Alembic commands ### def downgrade() -> None: # ### commands auto generated by Alembic - please adjust! ### op.drop_table("host_chains") # ### end Alembic commands ###