Add logs
This commit is contained in:
parent
d127901992
commit
43f578d311
6 changed files with 803 additions and 4009 deletions
18
migrations/1508261875640-logs.js
Normal file
18
migrations/1508261875640-logs.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
const sql =
|
||||
[`create table logs (
|
||||
id uuid PRIMARY KEY,
|
||||
device_id text,
|
||||
log_level text,
|
||||
timestamp timestamptz,
|
||||
message text)`
|
||||
]
|
||||
|
||||
db.multi(sql, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue