2020-04-13 15:56:52 +00:00
|
|
|
const db = require('../db/db')
|
|
|
|
const path = require('path')
|
|
|
|
require('dotenv').config({path: path.join(__dirname, '../../.env')})
|
|
|
|
|
2020-04-13 16:01:40 +00:00
|
|
|
db.Settings.sync().then(() => {
|
|
|
|
// Remove all previous settings
|
|
|
|
db.Settings.destroy({truncate: true})
|
2020-04-13 15:56:52 +00:00
|
|
|
|
2020-04-13 16:01:40 +00:00
|
|
|
// Create settings
|
|
|
|
db.Settings.create({ key: 'low-trigger', value: 100 })
|
|
|
|
db.Settings.create({ key: 'high-trigger', value: 900 })
|
|
|
|
db.Settings.create({ key: 'low', value: false })
|
|
|
|
db.Settings.create({ key: 'alert', value: false })
|
|
|
|
})
|