fix: npm run db:seed command runs successfully, db is populated#1477
Open
JanPhillips wants to merge 3 commits intomainfrom
Open
fix: npm run db:seed command runs successfully, db is populated#1477JanPhillips wants to merge 3 commits intomainfrom
JanPhillips wants to merge 3 commits intomainfrom
Conversation
Contributor
|
There are also some other seed files ready maybe to combine them for better sampling |
Contributor
Author
Cool! Let's talk about this! Thank you :) I believe @DavidJWhiteDev might also have some contributions for this effort as well... |
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.
Describe your changes
npm run db:seedwas not working withinapplications-service/packages/applications-service-api/, the DB was not being populated. I noticed this whilst working on a ticket related to translations for/register-of-advice, I needed some data in the database to know if the translations were working. Before I made the changes, the script was crashing because in a few places duplicate entries were being attempted/duplicated on existing fields that are meant to be unique for the table. To avoid this, instead of inserting values for foreign keys, it is connecting to the foreign that already exists.Useful information to review or test
Type of change 🧩
Checklist before requesting a review