feat: add new server log page
This commit is contained in:
parent
fc1951c4b2
commit
703c5d7c91
38 changed files with 2844 additions and 29 deletions
|
|
@ -2,6 +2,14 @@ const db = require('./db')
|
|||
|
||||
exports.up = function (next) {
|
||||
var sqls = [
|
||||
'create table server_logs ( ' +
|
||||
'id uuid PRIMARY KEY, ' +
|
||||
'device_id text, ' +
|
||||
'log_level text, ' +
|
||||
'timestamp timestamptz DEFAULT now(), ' +
|
||||
'message text, ' +
|
||||
'meta json)',
|
||||
|
||||
'CREATE TABLE IF NOT EXISTS user_config ( ' +
|
||||
'id serial PRIMARY KEY, ' +
|
||||
'type text NOT NULL, ' +
|
||||
|
|
|
|||
15
migrations/1572524820075-server-support-logs.js
Normal file
15
migrations/1572524820075-server-support-logs.js
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
const sql =
|
||||
[`create table server_support_logs (
|
||||
id uuid PRIMARY KEY,
|
||||
timestamp timestamptz not null default now() )`
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue