I have created a seeder file using sequelize-cli
to bulkInsert
data into a mysql db and it works all fine. However, one of the fields(userId
) that i'm inserting is a value present in another table(User
).
What I was planning to do is - Run a seed which inserts data into User
table first and then run my second seeder file.
My doubt - I can create the seeder files separately but how do I run those in sequence .ie. make sure the "user" seeder file runs and completes before I start seeding the second via sequelize-cli
?