The Sequelize Command Line Interface (CLI) Frequently Asked Question
$ sequelize init
Specify model name with --name
argument. List of table fields can be passed with --attributes
option
$ sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}'
Specify migration name with --name
argument
$ sequelize migration:create --name <migration_name>
$ sequelize db:migrate
$ sequelize db:migrate:undo:all
Specify seeder name with --name
argument
$ sequelize seed:create --name <seeder_name>
$ sequelize db:seed:all
$ sequelize db:seed:undo:all
The brackets {}
likely need to be quoted in your shell
sequelize model:create --name User --attributes role:enum:'{Admin,Guest}'
or possibly
sequelize model:create --name User --attributes role:enum:\{Admin,Guest\}