handle double dispense WIP

This commit is contained in:
Josh Harvey 2016-05-19 01:23:08 +03:00
parent adbd60b5a5
commit 1d323b0647
5 changed files with 107 additions and 3 deletions

View file

@ -0,0 +1,19 @@
'use strict'
var db = require('./db')
exports.up = function (next) {
db.query('CREATE TABLE IF NOT EXISTS cached_requests ( ' +
'id serial PRIMARY KEY, ' +
'device_fingerprint text NOT NULL, ' +
'session_id uuid NOT NULL, ' +
'path text NOT NULL, ' +
'method text NOT NULL, ' +
'body json NOT NULL, ' +
'UNIQUE (device_fingerprint, session_id, path, method) ' +
')', next)
}
exports.down = function (next) {
next()
}