Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sequelize create database schema from model

Can I use sequelize to create the database schema from the available model? I work on a project that has many migrations missing and no tests. To run tests I need to create a new db (sqlite3) but I cannot initialize its schema using migration (because they are missing). Is it possible to use the models to create the schema?

like image 657
Uko Avatar asked Jan 29 '23 09:01

Uko


1 Answers

Yes. If you just sync sequelize in your application, the models will create the database tables for you

like image 58
Michael McCabe Avatar answered May 14 '23 01:05

Michael McCabe