Merge branch 'dev' into feat/lam-1291/stress-testing
* dev: (85 commits) chore: console.log debug leftovers fix: third level navigation links fix: show subheader on refresh fix: machines/:id routing fix: customer route chore: update wallet nodes feat: shorten long addresses in funding page feat: shorten long addresses refactor: support copied text different from presented text chore: udpate react, downshift and routing refactor: use Wizard component on first route fix: autocomplete component rendering feat: skip2fa option on .env fix: drop contraint before dropping index chore: stop using alias imports fix: re-instate urlResolver chore: server code formatting chore: reformat code chore: adding eslint and prettier config chore: typo ...
This commit is contained in:
commit
e10493abc6
1398 changed files with 60329 additions and 157527 deletions
38
packages/server/migrations/001-initial.js
Normal file
38
packages/server/migrations/001-initial.js
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
const db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
var sqls = [
|
||||
'CREATE TABLE IF NOT EXISTS user_config ( ' +
|
||||
'id serial PRIMARY KEY, ' +
|
||||
'type text NOT NULL, ' +
|
||||
'data json NOT NULL ' +
|
||||
')',
|
||||
|
||||
'CREATE TABLE IF NOT EXISTS devices ( ' +
|
||||
'id serial PRIMARY KEY, ' +
|
||||
'fingerprint text NOT NULL UNIQUE, ' +
|
||||
'name text, ' +
|
||||
'authorized boolean, ' +
|
||||
'unpair boolean NOT NULL DEFAULT false' +
|
||||
')',
|
||||
|
||||
'CREATE TABLE IF NOT EXISTS pairing_tokens (' +
|
||||
'id serial PRIMARY KEY, ' +
|
||||
'token text, ' +
|
||||
'created timestamp NOT NULL DEFAULT now() ' +
|
||||
')',
|
||||
|
||||
'CREATE TABLE IF NOT EXISTS users ( ' +
|
||||
'id serial PRIMARY KEY, ' +
|
||||
'userName text NOT NULL UNIQUE, ' +
|
||||
'salt text NOT NULL, ' +
|
||||
'pwdHash text NOT NULL ' +
|
||||
')',
|
||||
]
|
||||
|
||||
db.multi(sqls, next)
|
||||
}
|
||||
|
||||
exports.down = function (next) {
|
||||
next()
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue