add mariadb & mysql support

This commit is contained in:
lesion
2021-12-07 23:53:35 +01:00
parent fb22dfd114
commit 6e10b64b96
3 changed files with 5 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ const db = {
},
connect (dbConf = config.db) {
log.debug(`Connecting to DB: ${JSON.stringify(dbConf)}`)
dbConf.dialectOptions = { autoJsonMap: false }
db.sequelize = new Sequelize(dbConf)
return db.sequelize.authenticate()
},

View File

@@ -5,7 +5,7 @@ module.exports = {
return queryInterface.createTable('event_notifications', {
status: {
type: Sequelize.ENUM,
values: ['new', 'sent', 'error'],
values: ['new', 'sent', 'error', 'sending'],
defaultValue: 'new',
index: true
},