admin管理员组文章数量:1334162
I've run help mand on sequelize and saw that there are two different mands with the same description:
$ sequelize help:migration:create
Sequelize [Node: 6.9.5, CLI: 2.5.1, ORM: 3.8.0, mysql: 2.5.0]
Loaded configuration file "config\config.json".
Using environment "development".
COMMANDS
sequelize migration:create -- Generates a new migration file.
sequelize migration:generate -- Generates a new migration file.
Is there any difference between them?
I've run help mand on sequelize and saw that there are two different mands with the same description:
$ sequelize help:migration:create
Sequelize [Node: 6.9.5, CLI: 2.5.1, ORM: 3.8.0, mysql: 2.5.0]
Loaded configuration file "config\config.json".
Using environment "development".
COMMANDS
sequelize migration:create -- Generates a new migration file.
sequelize migration:generate -- Generates a new migration file.
Is there any difference between them?
Share Improve this question asked Feb 23, 2017 at 7:52 Max YankovMax Yankov 13.3k15 gold badges72 silver badges143 bronze badges2 Answers
Reset to default 9No difference: migration:generate
is alias for migration:create
https://github./sequelize/cli/blob/master/lib/tasks/migration.js#L20
There is a small difference between create and generate:
- Create: This will create migration files that will have empty up and down query objects, in which you can write down your queries to update the database.
- Generate: This will generate the migrations with up and down queries by observing your database changes. You can see more of migration on the official sites.
本文标签:
版权声明:本文标题:javascript - What's the difference between "migration:create" and "migration:generate&quo 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742339768a2456360.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论