Problem
alembic upgrade head against an empty database does not reproduce prod's schema. Some models predate the migration chain and table hygiene was inconsistent. Three schemas currently disagree:
- prod, by historical accretion
- migrations-from-empty
Base.metadata via create_all, which is what the test suite uses
Tests validate against 3 while prod runs 1.
Why #808 cares
We can't be programmatically certain about table completeness if our migrations do not reproduce productions schema. We owe #832 a trustworthy schema.
Scope
- Schema-only dumps of prod and of a freshly-migrated empty database, diffed.
alembic check for the models-versus-database axis.
- Reconcile: a migration bringing the chain up to prod's actual state, or documented deliberate divergences.
Acceptance criteria
Problem
alembic upgrade headagainst an empty database does not reproduce prod's schema. Some models predate the migration chain and table hygiene was inconsistent. Three schemas currently disagree:Base.metadataviacreate_all, which is what the test suite usesTests validate against 3 while prod runs 1.
Why #808 cares
We can't be programmatically certain about table completeness if our migrations do not reproduce productions schema. We owe #832 a trustworthy schema.
Scope
alembic checkfor the models-versus-database axis.Acceptance criteria
alembic upgrade headfrom empty produces prod's schema, or every remaining difference has a written reason.Base.metadata.