I'm using the sequelize in my project to modelling my database for a API REST,but when a try to create a migration for my db, the sequelize only shows me the options for the execution,event though I already using the right commands to create the migration. Sequelize,sequelize-cli are already installed,I'm using mariadb. I already tested change the equal sign for a space between the "create" and "alunos", tried double quotes and single quotes on create and alunos too.
Asked
Active
Viewed 53 times
0
-
Does this answer your question? [How to auto generate migrations with Sequelize CLI from Sequelize models?](https://stackoverflow.com/questions/27835801/how-to-auto-generate-migrations-with-sequelize-cli-from-sequelize-models) – Wang Liang Sep 08 '21 at 20:30
-
https://stackoverflow.com/questions/27835801/ – Wang Liang Sep 08 '21 at 20:30
-
I tried, but it didn't worked – Marco Aurélio Lopes Júnior Sep 08 '21 at 21:51
-
`sequelize model:create --name MyUser --attributes first_name:string,last_name:string,bio:text` – Wang Liang Sep 08 '21 at 21:53
-
with sequelize, we cannot generate model from database. – Wang Liang Sep 08 '21 at 21:54
1 Answers
0
The syntax for generating migrations is
npx sequelize-cli migration:generate --name NameOfMigration

boc4life
- 941
- 5
- 10