Abstract
A method is disclosed for naming and policing ordered schema-migration files in a repository written concurrently from many branches. A new migration's filename is computed with no read of shared state, from a single leading letter, a fixed-width UTC timestamp, a fixed-width token of cryptographically random characters, and a normalized description. Because the migration runner orders files by a comparison of full filenames under which every digit sorts before every letter, the leading letter is a lexical sort fence: every new name sorts after every legacy sequentially numbered name however high legacy numbering climbs, so a fresh database never applies a new migration ahead of its legacy dependencies and no applied file is renamed. The token width is fixed from a birthday bound and asserted as a constant rather than sampled, and the retired maximum-plus-one allocator refuses with a failure status and an empty standard output. A branch-scoped allocation guard rejects newly added numbered files and, where a flag or environment marker requires a fork point it cannot resolve, fails instead of passing. A collision gate decides severity from an explicitly resolved context: on the mainline every duplicate not accepted by a member-set baseline blocks; on a branch the same detector is re-run over the fork-point tree and a duplicate already present there is reported and attributed but not charged; and a fork-point read that fails or is implausibly small downgrades to mainline severity instead of misattributing blame.
Creative Commons License

This work is licensed under a Creative Commons Attribution 4.0 License.
Recommended Citation
Assuncao, gustavo matthew, "Read-Free Migration Filename Allocation Behind a Lexical Sort Fence, with Context-Scoped Collision Blame Decided by Re-Running the Same Detector over the Fork-Point Tree", Technical Disclosure Commons, ()
https://www.tdcommons.org/dpubs_series/13214