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

Commit 0ed8a537 by danetrata-bvsecurity Committed by Sushant

docs(migrations): migration generate command (#11493)

1 parent fc8334cb
Showing with 6 additions and 0 deletions
......@@ -204,6 +204,12 @@ module.exports = {
}
```
We can generate this file using `migration:generate`. This will create `xxx-migration-skeleton.js` in your migration folder.
```bash
$ npx sequelize-cli migration:generate --name migration-skeleton
```
The passed `queryInterface` object can be used to modify the database. The `Sequelize` object stores the available data types such as `STRING` or `INTEGER`. Function `up` or `down` should return a `Promise`. Let's look at an example:
```js
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!