Run Seeder

Structure

To see the available options, run the following command:

jetshift seed --help

Command with all options:

jetshift seed migration-name -e mysql -n 10 -nd 5 -sd -sde

Options:

  • -e - Database engine. Default is mysql.
  • -n - Number of records to seed
  • -nd - Number of records to seed for dependent tables
  • -sd - Skip dependent seeders
  • -sde - Skip dependent seeders if data exists

Don’t use -sd and -sde together.

Run all seeders

Examples
jetshift seed # default engine is mysql
jetshift seed -e mysql

Run specific seeder

jetshift seed table-name -e database-engine
Example
jetshift seed users # default engine is mysql
jetshift seed users -e mysql

Run specific seeder with n records

jetshift seed table-name -e database-engine -n number-of-records
Example
jetshift seed users -n 10 # default engine is mysql
jetshift seed users -e mysql -n 10