Is there a way to have sequelize create the database I\'m trying to connect to if it doesn\'t exist?
I have a raw MySQL instance and I get this error back:
In my case I was using sqlite, but the idea was the same. I needed to create the database first with sqlite3
.
const sqlite = require('sqlite3');
const db = new sqlite.Database('/path/to/database.sqlite');
const sequelize = new Sequelize('database', '', '', {
dialect: 'sqlite',
storage: '/path/to/database.sqlite',
...
});