fix: add missing migration for mros report fields#3627
Merged
TaprootFreak merged 1 commit intodevelopfrom Apr 27, 2026
Merged
Conversation
Follow-up to PR #3621 — the entity columns reportCode/reason/action/ indicators were merged without a corresponding migration. Constraint names match TypeORM's auto-generated format (DF_ + sha1('mros_<column>').substring(0, 27)) so a future 'npm run migration' run on this schema doesn't see drift.
This was referenced Apr 25, 2026
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
Follow-up to #3621, which merged the entity columns
reportCode,reason,action,indicatorsonMroswithout a corresponding DB migration (caught by @davidleomay in #3621 (comment)).Adds the missing migration so any environment where #3621 has run code-side without DB-schema can be brought back in sync.
Constraint names
TypeORM's auto-generated naming algorithm is
<prefix>_ + sha1(tableName + "_" + columnName).substring(0, 27). Verified against the existingAddMrosmigration (all fourDF_/PK_/FK_constraints match). Used the same formula for the newDF_*constraint onreportCode:```
DF_34ee1d4c60de41c251fe14b9426 // sha1('mros_reportCode').substring(0, 27)
```
So future
npm run migrationruns against this schema won't detect a drift.Down
Removes the four columns and the named DEFAULT constraint in reverse order.
Test plan
reportCode='SAR', others NULL)down()reverts cleanlynpm run migrationafter this migration generates no schema diff