The banner-based MigrationSplitter works for feature migrations (hand-DDL +
CodeGen banner + generated block). It cannot handle baselines and other
old-style files, which are squashed snapshots with NO banners — tables, views,
sprocs, grants, and metadata INSERTs all flattened together, GO-separated.
This classifier keys off GO-batch boundaries + the leading statement of each
batch (and, for routines, the object NAME), so it separates content uniformly
whether or not banners are present:
keep/transpile : CREATE/ALTER TABLE · CREATE INDEX/TYPE · CREATE ROLE/SCHEMA
· sp_addextendedproperty (→ COMMENT ON)
drop+regenerate: CREATE VIEW/PROCEDURE/FUNCTION/TRIGGER whose name matches the
CodeGen convention (vw, spCreate, spUpdate, spDelete, fn, …)
+ GRANT/REVOKE (CodeGen re-emits permissions)
drop+reseed : metadata INSERT/UPDATE/DELETE (Entity/EntityField/… regenerated
by CodeGen introspection; curated rows reseeded by mj sync push)
flag : CREATE PROCEDURE/FUNCTION/TRIGGER NOT matching the CodeGen
convention → hand-written, needs a human PG version
noise : PRINT/SET/USE/GO/IF @@ERROR batch-control
MigrationStatementSplitter — statement-level (GO-batch) classification.
The banner-based
MigrationSplitterworks for feature migrations (hand-DDL + CodeGen banner + generated block). It cannot handle baselines and other old-style files, which are squashed snapshots with NO banners — tables, views, sprocs, grants, and metadata INSERTs all flattened together, GO-separated.This classifier keys off GO-batch boundaries + the leading statement of each batch (and, for routines, the object NAME), so it separates content uniformly whether or not banners are present:
keep/transpile : CREATE/ALTER TABLE · CREATE INDEX/TYPE · CREATE ROLE/SCHEMA · sp_addextendedproperty (→ COMMENT ON) drop+regenerate: CREATE VIEW/PROCEDURE/FUNCTION/TRIGGER whose name matches the CodeGen convention (vw, spCreate, spUpdate, spDelete, fn, …) + GRANT/REVOKE (CodeGen re-emits permissions) drop+reseed : metadata INSERT/UPDATE/DELETE (Entity/EntityField/… regenerated by CodeGen introspection; curated rows reseeded by
mj sync push) flag : CREATE PROCEDURE/FUNCTION/TRIGGER NOT matching the CodeGen convention → hand-written, needs a human PG version noise : PRINT/SET/USE/GO/IF @@ERROR batch-control