42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
"""Rename agents to scouts.
|
|
|
|
Revision ID: 007
|
|
Revises: d6e3f4a5b6c7
|
|
Create Date: 2026-05-15
|
|
|
|
Renames the entire agents subsystem identifiers to scouts.
|
|
Pre-1.0 — no data preservation concerns beyond ALTER TABLE rename.
|
|
"""
|
|
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
|
|
|
|
revision: str = "007"
|
|
down_revision: Union[str, None] = "d6e3f4a5b6c7"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# Tables
|
|
op.rename_table("local_agent_configs", "local_scout_configs")
|
|
op.rename_table("cloud_agent_configs", "cloud_scout_configs")
|
|
op.rename_table("agent_run_logs", "scout_run_logs")
|
|
|
|
# Columns
|
|
op.alter_column("local_scout_configs", "agent_config", new_column_name="scout_config")
|
|
op.alter_column("scout_run_logs", "agent_id", new_column_name="scout_id")
|
|
op.alter_column("scout_run_logs", "agent_type", new_column_name="scout_type")
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.alter_column("scout_run_logs", "scout_type", new_column_name="agent_type")
|
|
op.alter_column("scout_run_logs", "scout_id", new_column_name="agent_id")
|
|
op.alter_column("local_scout_configs", "scout_config", new_column_name="agent_config")
|
|
|
|
op.rename_table("scout_run_logs", "agent_run_logs")
|
|
op.rename_table("cloud_scout_configs", "cloud_agent_configs")
|
|
op.rename_table("local_scout_configs", "local_agent_configs")
|