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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742339769a4425385.html
评论列表(0条)