migration fix + removed some old incoming checking
This commit is contained in:
parent
d9a9c9f4eb
commit
71aa425dd1
5 changed files with 20 additions and 53 deletions
|
|
@ -3,16 +3,22 @@
|
|||
var db = require('./db');
|
||||
|
||||
exports.up = function(next) {
|
||||
db.query('CREATE TABLE IF NOT EXISTS bills ( ' +
|
||||
var sqls = [
|
||||
'CREATE TABLE IF NOT EXISTS bills ( ' +
|
||||
'id uuid PRIMARY KEY, ' +
|
||||
'device_fingerprint text NOT NULL, ' +
|
||||
'denomination integer NOT NULL, ' +
|
||||
'currency_code text NOT NULL, ' +
|
||||
'satoshis integer NOT NULL, ' +
|
||||
'to_address text NOT NULL, ' +
|
||||
'session_id uuid NOT NULL, ' +
|
||||
'transaction_id uuid NOT NULL, ' +
|
||||
'device_time bigint NOT NULL, ' +
|
||||
'created timestamp NOT NULL DEFAULT now() )', next);
|
||||
'created timestamp NOT NULL DEFAULT now() )',
|
||||
|
||||
'ALTER TABLE bills RENAME COLUMN transaction_id TO session_id'
|
||||
];
|
||||
|
||||
db.multi(sqls, next);
|
||||
};
|
||||
|
||||
exports.down = function(next) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue