"""Remove manager_name foreign key

Revision ID: 35bb042920a3
Revises: 0c0b1dea52dc
Create Date: 2025-07-09 14:17:24.601731

"""

from alembic import op

# revision identifiers, used by Alembic.
revision = "35bb042920a3"
down_revision = "0c0b1dea52dc"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint(op.f("base_record_manager_name_fkey"), "base_record", type_="foreignkey")
    op.drop_constraint(op.f("record_compute_history_manager_name_fkey"), "record_compute_history", type_="foreignkey")
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_foreign_key(
        op.f("record_compute_history_manager_name_fkey"),
        "record_compute_history",
        "compute_manager",
        ["manager_name"],
        ["name"],
    )
    op.create_foreign_key(
        op.f("base_record_manager_name_fkey"), "base_record", "compute_manager", ["manager_name"], ["name"]
    )
    # ### end Alembic commands ###
