change to cached_responses; actively prune table
This commit is contained in:
parent
25d782a2c5
commit
29759fe132
3 changed files with 18 additions and 11 deletions
|
|
@ -3,13 +3,14 @@
|
|||
var db = require('./db')
|
||||
|
||||
exports.up = function (next) {
|
||||
db.query('CREATE TABLE IF NOT EXISTS cached_requests ( ' +
|
||||
db.query('CREATE TABLE IF NOT EXISTS cached_responses ( ' +
|
||||
'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, ' +
|
||||
'created timestampz NOT NULL DEFAULT now(), ' +
|
||||
'UNIQUE (device_fingerprint, session_id, path, method) ' +
|
||||
')', next)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue