mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
add mariadb & mysql support
This commit is contained in:
parent
fb22dfd114
commit
6e10b64b96
3 changed files with 5 additions and 2 deletions
|
@ -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')]")
|
||||
|
|
|
@ -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()
|
||||
},
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue