added db indexes

This commit is contained in:
Josh Harvey 2014-11-28 17:23:47 -05:00
parent 38ba53a873
commit bbc22b2d8b

View file

@ -32,6 +32,7 @@ exports.up = function(next) {
'created timestamp NOT NULL DEFAULT now(), ' +
'UNIQUE (session_id, to_address, stage, authority) ' +
')',
'CREATE INDEX ON transactions (session_id)',
'CREATE TABLE pending_transactions ( ' +
'id serial PRIMARY KEY, ' +
@ -57,7 +58,8 @@ exports.up = function(next) {
'refill boolean NOT NULL, ' +
'error text, ' +
'created timestamp NOT NULL DEFAULT now() ' +
')'
')',
'CREATE INDEX ON dispenses (device_fingerprint)'
];
// Need to call this separately to ignore error