diff --git a/pages/setup/DbStep.vue b/pages/setup/DbStep.vue index 17c55827..2e975a6d 100644 --- a/pages/setup/DbStep.vue +++ b/pages/setup/DbStep.vue @@ -6,9 +6,11 @@ v-btn-toggle(text color='primary' v-model='db.dialect') v-btn(value='sqlite' text) sqlite v-btn(value='postgres' text) postgres + v-btn(value='mariadb' text) mariadb + v-btn(value='mysql' text) mysql template(v-if='db.dialect === "sqlite"') v-text-field(v-model='db.storage' label='Path') - template(v-if='db.dialect === "postgres"') + template(v-if='db.dialect !== "sqlite"') v-text-field(v-model='db.hostname' label='Hostname' :rules="[$validators.required('hostname')]") v-text-field(v-model='db.database' label='Database' :rules="[$validators.required('database')]") v-text-field(v-model='db.username' label='Username' :rules="[$validators.required('username')]") diff --git a/server/api/models/index.js b/server/api/models/index.js index 624277ee..1e996ee8 100644 --- a/server/api/models/index.js +++ b/server/api/models/index.js @@ -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() }, diff --git a/server/migrations/20191025152224-event_notifications.js b/server/migrations/20191025152224-event_notifications.js index c9bd00ea..fbca0848 100644 --- a/server/migrations/20191025152224-event_notifications.js +++ b/server/migrations/20191025152224-event_notifications.js @@ -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 },