Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Recreating database sequelizejs is slow

When recreating the sequelizejs database with the sequelize.sync({ force: true }) command, then it takes around 3.5seconds before it is done.

Now when running tests this command has to run for each tests thus resulting in super slow tests.

Is there any way I can fix this so the tests run within 1 second?

like image 302
Xavier Geerinck Avatar asked May 02 '26 05:05

Xavier Geerinck


1 Answers

I decided to clean the tables instead of recreating them the whole time. This works faster and works for what I needed.

like image 175
Xavier Geerinck Avatar answered May 04 '26 22:05

Xavier Geerinck