sequelize / express-example

A proposal for the usage of Sequelize within an Express.JS application.
MIT License
2.5k stars 770 forks source link

Add seed data #59

Closed MoezGholami closed 4 years ago

MoezGholami commented 7 years ago

If the purpose of this repo is providing a sample sequelize project, it will be beneficial if you add seed examples.

ahelord commented 7 years ago

I agree you should do the PR @MoezGholami

fakiolinho commented 7 years ago

Yes, i am having some nightmares trying to use Umzug in my beforeEach hooks to reset seeders. I am searching everywhere without a proper walkthrough. Regarding migrations things are quite straightforward but when it comes to seeders docs are really poor.

papb commented 4 years ago

Hello! We have a mini example of seeding the database with dummy data now:

https://github.com/sequelize/express-example/blob/master/express-main-example/sqlite-example-database/setup.js