docs: allow hand-written schema migrations with TypeORM hash formula#3628
Merged
TaprootFreak merged 1 commit intodevelopfrom Apr 27, 2026
Merged
docs: allow hand-written schema migrations with TypeORM hash formula#3628TaprootFreak merged 1 commit intodevelopfrom
TaprootFreak merged 1 commit intodevelopfrom
Conversation
Reality update from PR #3621: contributors / AI assistants without local DB setup couldn't run 'npm run migration', so they skipped the migration entirely (David caught it after merge). The strict ban on hand-writing didn't survive contact with that case. The new policy keeps 'npm run migration' as the preferred path but adds an explicit fallback: hand-written is allowed if the constraint names match TypeORM's deterministic algorithm. Documents the formula (prefix + sha1 substring + length per constraint type) and the many-to-many join-table conventions. Verifiable: every contributor can sanity-check their hashes against existing 'AddMros'-style constraints before pushing.
davidleomay
approved these changes
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates
CONTRIBUTING.mdto reflect reality after PR #3621 (entity merged without migration, fixed in #3627):npm run migrationas the preferred pathnode_modules/typeorm/naming-strategy/DefaultNamingStrategy.js):<prefix>_ + sha1(tableName + '_' + columnNames.sort().join('_')).substring(0, N)<owner>Id/<inverse>Idcolumns, CASCADE FKs)AddMros-style migration before committingThe strict ban on hand-writing didn't survive the first time someone (here: an AI assistant) couldn't run
npm run migrationlocally. Better to document a verifiable fallback than to keep skipping migrations.Test plan
mros_updatedinto the formula, getf6ade72c09ca260e3ce42ba0781