"""Rename Legal knowledge base to Risk & Control

Revision ID: 010_rename_legal_kb
Revises: 009_production_agencies
Create Date: 2026-05-14

"""
from alembic import op

revision: str = '010_rename_legal_kb'
down_revision: str = '009_production_agencies'
branch_labels = None
depends_on = None


def upgrade() -> None:
    op.execute("""
        UPDATE knowledge_bases
        SET display_name = 'Risk & Control'
        WHERE agent_key = 'legal'
    """)


def downgrade() -> None:
    op.execute("""
        UPDATE knowledge_bases
        SET display_name = 'Legal'
        WHERE agent_key = 'legal'
    """)
