-
Notifications
You must be signed in to change notification settings - Fork 0
[SSF-22] Create Dummy Data for Database #48
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
|
think you might want to merge main because Sam did some updates to the pantry entity which might cause some problems with the data you're adding |
amywng
left a comment
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'll send you what i got for what pantry data should look like on slack but it's also in this pr
…H/SSF-47-create-dummy-data-for-db
…H/SSF-47-create-dummy-data-for-db
amywng
left a comment
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 don't think you added the activities comments column
… rolem, adding activities comments col
dburkhart07
left a comment
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.
One small deletion, but aside from that LGTM!
| ('Organic Suppliers LLC', (SELECT user_id FROM public.users WHERE email = 'jennifer.t@organic.com' LIMIT 1)) | ||
| `); | ||
|
|
||
| await queryRunner.query(` |
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 think we may not need these inserted, primarily because we already have a pantry_user_id field in the pantry table. The role is just to essentially say this person is a pantry representative I believe.
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.
as Bhuvan had it though the pantry tables are linked to these users by that pantry_user_id. There is dummy data for actual users with that pantry role (lines 18-20). I could make some more of those and link them by pantry_user_id but I'm wondering if that is really necessary. I think it is fine as is? lmk ur thoughts
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 initially also did not want people to get confused that pantries were also users, but after a second look I think this will not be the case. This should be good then, thanks for picking this up!
ℹ️ Issue
Closes 47
📝 Description
I added a migration file that populates all of our table with a few rows of sample seed data. I also added the migration to our typeorm config file.
✔️ Verification
Tested each table in postgres to see if it was populated.
🏕️ (Optional) Future Work / Notes
Dummy data will need to be updated as database migration files are created. Also it may be worth considering typeorm seeding to be able to generate new test data