21 lines
525 B
JavaScript
21 lines
525 B
JavaScript
const db = require('./db')
|
|
const { saveConfig } = require('./settings')
|
|
|
|
exports.up = function (next) {
|
|
const sql = [`ALTER TYPE notification_type ADD VALUE 'security'`]
|
|
|
|
const newConfig = {}
|
|
newConfig.notifications_email_security = true
|
|
newConfig.notifications_sms_security = true
|
|
newConfig.notifications_notificationCenter_security = true
|
|
|
|
return saveConfig(newConfig)
|
|
.then(() => db.runAll(sql, next))
|
|
.catch(err => {
|
|
return next(err)
|
|
})
|
|
}
|
|
|
|
module.exports.down = function (next) {
|
|
next()
|
|
}
|