From cloud#1736's audit: sys_metadata_history's declared schema carries neither project_id nor environment_id (both removed in the M1 / branch-removal amendments), but migrate-project-id-to-environment-id.ts still lists it in AFFECTED_TABLES. Running the migration against a DB whose physical table still has project_id would rename it to environment_id — a column no declaration knows about, i.e. a fresh orphan of exactly the class cloud's drift audit just spent 53 findings classifying. Deliverable: drop sys_metadata_history from AFFECTED_TABLES (or gate each entry on the target column existing in the CURRENT declaration), with a test pinning the list to declared reality.
From cloud#1736's audit: sys_metadata_history's declared schema carries neither project_id nor environment_id (both removed in the M1 / branch-removal amendments), but migrate-project-id-to-environment-id.ts still lists it in AFFECTED_TABLES. Running the migration against a DB whose physical table still has project_id would rename it to environment_id — a column no declaration knows about, i.e. a fresh orphan of exactly the class cloud's drift audit just spent 53 findings classifying. Deliverable: drop sys_metadata_history from AFFECTED_TABLES (or gate each entry on the target column existing in the CURRENT declaration), with a test pinning the list to declared reality.