8649a13118
The GS/IR migration cutover is complete, so the runbook tooling is dead weight. Removed: - services/migrators/ (gs_ingest, ir_ingest, tag_apply, ml_queue, verify, cleanup), tasks/migration.py, api/migrate.py (+ blueprint registration) - MigrationRun model; alembic 0027 drops the migration_run table - frontend LegacyMigrationCard + migration store (+ MaintenancePanel ref) - celery include + task route + celery_signals queue mapping for migration.* - the 1 GB MAX_CONTENT_LENGTH / MAX_FORM_MEMORY override (added solely for the ir_ingest upload) - migration-surface tests (test_api_migrate, test_migration_verify, test_ir_ingest, test_gs_ingest, test_tag_apply) Kept: the alembic schema-migration tests (test_migration_00XX — unrelated) and cleanup_service.py (the permanent artist-cascade/unlink home). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
51 lines
1.8 KiB
Python
51 lines
1.8 KiB
Python
"""drop migration_run — one-and-done GS/IR migration tooling removed
|
|
|
|
Revision ID: 0027
|
|
Revises: 0026
|
|
Create Date: 2026-05-29
|
|
|
|
The GS/IR migration tooling (services/migrators, /api/migrate, the
|
|
run_migration task, LegacyMigrationCard, and the MigrationRun model) was
|
|
removed after the migration cutover completed. This drops its now-orphaned
|
|
run-log table. Downgrade recreates the table (mirrors the old model) so the
|
|
migration is reversible.
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
from sqlalchemy.dialects.postgresql import JSONB
|
|
|
|
revision: str = "0027"
|
|
down_revision: Union[str, None] = "0026"
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.drop_table("migration_run")
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.create_table(
|
|
"migration_run",
|
|
sa.Column("id", sa.Integer(), primary_key=True),
|
|
sa.Column("kind", sa.String(length=32), nullable=False),
|
|
sa.Column("status", sa.String(length=32), nullable=False),
|
|
sa.Column("dry_run", sa.Boolean(), nullable=False, server_default=sa.false()),
|
|
sa.Column(
|
|
"started_at", sa.DateTime(timezone=True), nullable=False,
|
|
server_default=sa.func.now(),
|
|
),
|
|
sa.Column("finished_at", sa.DateTime(timezone=True), nullable=True),
|
|
sa.Column(
|
|
"counts", JSONB(), nullable=False, server_default=sa.text("'{}'::jsonb"),
|
|
),
|
|
sa.Column("error", sa.Text(), nullable=True),
|
|
sa.Column(
|
|
"metadata", JSONB(), nullable=False, server_default=sa.text("'{}'::jsonb"),
|
|
),
|
|
)
|
|
op.create_index("ix_migration_run_kind", "migration_run", ["kind"])
|
|
op.create_index("ix_migration_run_status", "migration_run", ["status"])
|