"""Remove superseded homepage configuration modules. The homepage workbench now owns the five supported areas: hero slides, wanfa recommendations, vehicle options, team buildings, and wild archives. The former destination/demand/experience singleton tables are no longer part of the public or admin contracts and must not be recreated by ``create_all``. """ from alembic import op import sqlalchemy as sa revision = "0027_remove_legacy_home_modules" down_revision = "0026_admin_ownership" branch_labels = None depends_on = None LEGACY_TABLES = ( "DemandForm", "DemandFeatureCard", "DemandHero", "DestinationHero", "HomeExperience", "VehicleServiceConfig", ) def upgrade() -> None: for table_name in LEGACY_TABLES: op.execute(sa.text(f'DROP TABLE IF EXISTS "{table_name}"')) def downgrade() -> None: # The legacy tables were removed from the ORM and contracts. Recreating # them on downgrade would produce empty, unsupported modules, so the # destructive cleanup intentionally has no reverse operation. pass