[SSF-22] Create Dummy Data for Database#48
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 |
…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.
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.
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.
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.
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.
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