Run Migration:
sequelize db:migrateFirst, revert the previous migration:
npx sequelize-cli db:migrate:undoUse the sequelize-cli to generate a new migration file with a descriptive name:
npx sequelize-cli migration:generate --name create_users_tableEnsure that your
Usermodel is defined correctly and all the fields mentioned in the seeder file match with your model attributes. Then you can run this seeder using Sequelize CLI:
npx sequelize-cli db:seed:allAnd to rollback the seed data:
npx sequelize-cli db:seed:undo:allTo create a seeder file using Sequelize CLI, you can use the following command:
npx sequelize-cli seed:generate --name create-usersDrop the Database:
npx sequelize-cli db:dropnpx sequelize-cli db:create
npx sequelize-cli db:create