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 (comma separated with no spaces at all)
$ 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 or there needs to be a space between the values
sequelize model:create --name User --attributes role:enum:'{Admin,Guest}'
or
sequelize model:create --name User --attributes role:enum:'{Admin, Guest}'
or possibly
sequelize model:create --name User --attributes role:enum:\{Admin,Guest\}