Optional
databaseThe version of the Database Sequelize will connect to. If unspecified, or set to 0, Sequelize will retrieve it during its first connection to the Database.
The dialect of the database you are connecting to. Either the name of the dialect, or a dialect class.
Optional
hooksSets global permanent hooks.
Optional
modelsA list of models to load and init.
This option is only useful if you created your models using decorators. Models created using Model.init or Sequelize#define don't need to be specified in this option.
Use importModels to load models dynamically:
import { User } from './models/user.js';
new Sequelize({
models: [User],
});
new Sequelize({
models: await importModels(__dirname + '/*.model.ts'),
});
Optional
poolConnection pool options
Optional
urlThe connection URL. If other connection options are set, they will override the values set in this URL.
Sequelize options that are not persisted in the Sequelize instance.