-
Notifications
You must be signed in to change notification settings - Fork 0
#525: Update Application Model to Include Relation dac_id WIP #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…nadian-Genome-Library/daco into feat/525-application-model-dac-id
| // Apply backfill with PCGL_DACO_ID | ||
| await transaction | ||
| .update(applications) | ||
| .set({ | ||
| dac_id: `${dbConfig.PCGL_DACO_ID}`, | ||
| }) | ||
| .where(isNull(applications.dac_id)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need an additional filter here to only select applications that are past the submitted for reivew stage (under review, revisions requested, or approved i think?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left application state CLOSED out of the backfill as well because technically an applicant can close a application while its still in DRAFT. BUT they can also close it post review stage, so I am unsure whats the more 'correct' option here.
Open to insight
Heres the commit for the update: e7558b1
| "dev:server": "tsx watch --clear-screen=false --env-file=.env ./src/main.ts", | ||
| "dev:watch": "nx watch --projects=@pcgl-daco/api --includeDependentProjects -- nx run-many -t build \\$NX_PROJECT_NAME --exclude=@pcgl-daco/api", | ||
| "dbml": "tsx ./src/db/dbml.ts", | ||
| "migrate:dac-id": "tsx --env-file=.env src/scripts/dac-id-migration.ts", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
naming is hard, open to name suggestions for this script. Or its fine as it is
Special Instructions
Steps on how to apply the dac_id migrations:
Summary
dac_id migration for the applications model table.
Related Issues
daco_idproperty #525Description of Changes
dac_idinto Application tablePCGL_DACO_IDapplicationentries with nulldac_idwith the PCGL_DAC_ID env varapplicationtable coldac_idto not null.Readiness Checklist
#{TicketNumber}: Description of Changesapi,ui,data-model, etc.)feature,fix,chore,documentation).env.schemafile and documented in the README