不要怂,就是干,撸起袖子干!

You need to sign in or sign up before continuing.
Commit c22f8214 by Sushant Committed by GitHub

docs(migration): incorrect seed command

1 parent 7229ccb9
Showing with 3 additions and 3 deletions
...@@ -129,7 +129,7 @@ Now we should edit this file to insert demo user to `User` table. ...@@ -129,7 +129,7 @@ Now we should edit this file to insert demo user to `User` table.
module.exports = { module.exports = {
up: (queryInterface, Sequelize) => { up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('User', [{ return queryInterface.bulkInsert('Users', [{
firstName: 'John', firstName: 'John',
lastName: 'Doe', lastName: 'Doe',
email: 'demo@demo.com' email: 'demo@demo.com'
...@@ -137,7 +137,7 @@ module.exports = { ...@@ -137,7 +137,7 @@ module.exports = {
}, },
down: (queryInterface, Sequelize) => { down: (queryInterface, Sequelize) => {
return queryInterface.bulkDelete('User', null, {}); return queryInterface.bulkDelete('Users', null, {});
} }
}; };
...@@ -147,7 +147,7 @@ module.exports = { ...@@ -147,7 +147,7 @@ module.exports = {
In last step you have create a seed file. Its still not committed to database. To do that we need to run a simple command. In last step you have create a seed file. Its still not committed to database. To do that we need to run a simple command.
```bash ```bash
$ node_modules/.bin/sequelize db:seed $ node_modules/.bin/sequelize db:seed:all
``` ```
This will execute that seed file and you will have a demo user inserted into `User` table. This will execute that seed file and you will have a demo user inserted into `User` table.
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!