Cerbero.Check.ColumnTypeChange (cerbero v0.1.0)

Copy Markdown View Source

Rule 4: type changes — rewrite + index rebuilds on PG; engine-rejection table on CRDB.

Silences type changes on tables born in this deploy (not backfilled) — safe by construction. For unmappable DSL types (custom types), emits no finding: deliberate false-positive guard.

CRDB: crdb_judge/5 used to branch on whether the altered column was indexed, constrained, or itself a generated/stored column, treating any of those as engine-rejected. The layer 4 empirical differential (test/integration/crdb_test.exs) found that false on a live CRDB v25.1 node — none of those conditions cause a rejection anymore — so that branch was dead code (Elixir's type checker flagged the {:rejected, _} clause as unreachable once Cerbero.DDL.CRDB.judge/2's data was corrected) and has been removed along with the now-unused indexed?/constrained?/generated_stored? detection. See the comment on that judge/2 clause for the full evidence. The one case that does still reject (a separate generated column elsewhere in the table depending on this one, SQLSTATE 2BP01) is distinguished here by generated_siblings/3 — to the extent the snapshot allows: it records which columns are generated, not their expressions.