v12.0.0 - initial commit

This commit is contained in:
padreug 2025-12-31 19:04:13 +01:00
commit e2c49ea43c
1145 changed files with 97211 additions and 0 deletions

View file

@ -0,0 +1,24 @@
var db = require('./db')
exports.up = function (next) {
var sql = [
'drop table if exists devices',
'drop table if exists paired_devices',
`create table devices (
device_id text PRIMARY KEY,
name text NOT NULL,
cashbox integer NOT NULL default 0,
cassette1 integer NOT NULL default 0,
cassette2 integer NOT NULL default 0,
paired boolean NOT NULL default TRUE,
display boolean NOT NULL default TRUE,
created timestamptz NOT NULL default now()
)`,
'alter table pairing_tokens add column name text NOT NULL',
]
db.runAll(sql, next)
}
exports.down = function (next) {
next()
}