How sequelize-cli runs a single seeder

in sequelize-cli, sequelize db:seed:all executes all seeder in the seeders folder.
if you only want to execute a certain seeder, such as the 20180906061439-user2.js file, how do you write it on the command line?

$ sequelize --help

Sequelize CLI [Node: 8.9.0, CLI: 3.2.0, ORM: 4.8.0]

WARNING: This version of Sequelize CLI is not fully compatible with Sequelize v4. https://github.com/sequelize/cli-sharpsequelize-support

Commands:
  db:migrate                        Run pending migrations
  db:migrate:schema:timestamps:add  Update migration table to have timestamps
  db:migrate:status                 List the status of all migrations
  db:migrate:undo                   Reverts a migration
  db:migrate:undo:all               Revert all migrations ran
  db:seed                           Run specified seeder
  db:seed:undo                      Deletes data from the database
  db:seed:all                       Run every seeder
  db:seed:undo:all                  Deletes data from the database
  db:create                         Create database specified by configuration
  db:drop                           Drop database specified by configuration
  init                              Initializes project
  init:config                       Initializes configuration
  init:migrations                   Initializes migrations
  init:models                       Initializes models
  init:seeders                      Initializes seeders
  migration:generate                Generates a new migration file  [aliases: migration:create]
  model:generate                    Generates a model and its migration  [aliases: model:create]
  seed:generate                     Generates a new seed file  [aliases: seed:create]

Options:
  --version  Show version number  [boolean]
  --help     Show help  [boolean]

it shows that the db:seed command runs a certain seeder, but how exactly should I use it?

Aug.27,2021

image.png
check the help of the corresponding operation. It shows that if you follow your seeder seed file under the corresponding parameters, you can generate it individually or with multiple

.

npx sequelize db:seed-- seed 20191105081904-user.js


Brother, are you using sequelize-cli, too? can you add a QQ to chat with me? very few people are using this in the directory, and it is difficult to find people to communicate with others if they have problems


sequlize group 752604632

Menu