add migrations
This commit is contained in:
parent
c38372a173
commit
e650e591d5
6 changed files with 163 additions and 0 deletions
20
migrations/002-bills.js
Normal file
20
migrations/002-bills.js
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
'use strict';
|
||||
|
||||
var db = require('./db');
|
||||
|
||||
exports.up = function(next){
|
||||
db.query('CREATE TABLE 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, ' +
|
||||
'device_time bigint NOT NULL, ' +
|
||||
'created timestamp NOT NULL DEFAULT now() )', next);
|
||||
};
|
||||
|
||||
exports.down = function(next){
|
||||
next();
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue