Schema Proof vs. Ledger Record
In one production migration case, direct inspection of the live schema proved the shape of the change, while the migration ledger could not serve as proof of application because it had stopped being maintained. What was proved and what was only inferred are kept apart below.
Two records that answer different questions
When a migration is reported as applied, two things can be asked of it: what does the database now contain, and what does the migration ledger say happened. In the production case described here the ledger was silent about a change that was plainly live. This page sets out what each source could and could not prove.
What direct inspection proved
Direct inspection proves the shape of the change. Reading the production schema showed that the new column existed, that it was a nullable text column with no default, and that the stored table definition carried a constraint matching the landed definition byte for byte. A count of rows with a value in the column came back zero, so no backfill or classification had occurred. The two related migrations that were outside the task were still absent.
What the ledger could not prove
The ledger had stopped being maintained at an early entry, and the helper that applied this change does not write to it. A change applied that way leaves no ledger record, so the ledger cannot serve as proof of application here. The check of the ledger confirmed the absence: it had no entry for the change.
What shell history added, and what stayed unknown
Shell history showed which command ran and when it was consumed. That is evidence of the command, not of the database: nothing in production itself shows which path applied the column or when.
On whether pre-existing rows were left alone, the evidence is weaker. Row count and highest row id both grew by the same eight since a baseline, which looks like new inserts from ordinary traffic. That no existing rows were rewritten is inferred, not proved, because no before-image was taken and the other columns of existing rows were not compared before and after.
A neighbouring contrast
For another case of keeping a finding apart from an action, see classification vs. cleanup authorization. This page makes no claim about how that material applies here.
What this does not claim
- This does not claim the ledger is wrong in general.
- This does not generalize beyond this one migration case.
- This does not say anything about deploys that were not made.
FAQ
- If a database change is live but the migration ledger does not list it, what is proved?
- In this case, direct inspection proves the shape of the change: the column exists, with its type and nullability, and its stored constraint matches the landed definition. Zero populated values showed that no backfill occurred, and the other migrations outside the task were still absent.
- Why could the ledger not prove the change was applied?
- It had stopped being maintained at an early entry, and the helper that applied this change does not write it. The ledger cannot serve as proof of application here.
- Can anything show which command applied the change?
- Shell history showed which command ran and when it was consumed. Nothing in production itself shows which path applied the column.
- Was it proved that existing rows were not rewritten?
- No. That was inferred, not proved. Row count and highest row id rose by the same eight, consistent with new inserts, but no before-image of the table was taken.