{"category_id":"repository","default_severity":"warning","description":"A Git comparison adding multiple logical SQL revisions in one migration stream needs consolidation review. Conventional migrations directories, migration-set components and configured review-policy migration roots identify separate streams. Automatic discovery excludes test, fixture, example, vendor and generated paths; explicit manifest roots remain authoritative. Base stream roots retain their ownership: head changes cannot remove them or split them into child streams. New roots outside those streams remain independent.","examples":[{"after":"{\"base\":[],\"head\":[\"db/migrations/001.sql\"]}","before":"{\"base\":[],\"head\":[\"db/migrations/001.sql\",\"db/migrations/002.sql\"]}","expected_severity":"warning","id":"sarj-migration-consolidation","language":"json","title":"One new logical SQL revision per stream"}],"fix":"Combine compatible new revisions in their original statement order, preserve framework metadata and rollback contracts, and rerun against the pull-request base. Do not rewrite applied history. Retain necessary boundaries with an exact reviewed exception. No automatic rewrite is offered. Direct SQL files, up/down pairs, Flyway V/U versions and Prisma revision directories are recognized; repeatable Flyway R__ scripts and other nested layouts are outside this rule.","kind":"rule","references":[],"rule_id":"repository/artifacts/migration-consolidation","rule_version":1,"slug":"migration-consolidation","source":{"path":"src/repo_standards/policy_sarj/policy.py","symbol":"repository/artifacts/migration-consolidation"},"title":"Consolidate compatible new SQL migrations in one pull request","topic_id":"artifacts","why":"Separate unapplied migrations from one change add needless history and execution boundaries. Required transaction, rollback and deployment boundaries can still justify multiple revisions, so filenames alone support a warning rather than proving that concatenation is safe."}
