Skip to content
Advertisement

How to seed a one file only with sequelize-cli?

sequqlize-cli db:seed:all is working fine, but how to seed only one file? Tried to db:seed:[name-that-i-gave-with-create-command] and db:seed:[full-path-to-seed-file.js] but it doesnt work. It outputs nothing. Docs say sequelize db:seed Run specified seeder But how to do that?

Advertisement

Answer

To run a specific seed indicate --seed <seed_file_nams.js>:

sequelize db:seed --seed my_seeder_file.js
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement