lamassu-server/packages/server/migrations/1572524820075-server-support-logs.js
2025-05-12 10:52:54 +01:00

24 lines
494 B
JavaScript

var db = require('./db')
exports.up = function (next) {
const sql =
[
'create table server_logs ( ' +
'id uuid PRIMARY KEY, ' +
'device_id text, ' +
'log_level text, ' +
'timestamp timestamptz DEFAULT now(), ' +
'message text, ' +
'meta json)',
`create table server_support_logs (
id uuid PRIMARY KEY,
timestamp timestamptz not null default now() )`
]
db.multi(sql, next)
}
exports.down = function (next) {
next()
}