Add transaction versioning, tx cancellation (#79)

This commit is contained in:
Josh Harvey 2017-08-29 16:08:06 +03:00 committed by GitHub
parent 4a97535dec
commit 500edcf279
15 changed files with 2223 additions and 1468 deletions

View file

@ -1,19 +1,18 @@
var db = require('./db')
exports.up = function(next) {
exports.up = function (next) {
const sql =
[`create type compliance_types as enum ('manual', 'sanctions', 'sanctions_override') `,
`create table compliance_authorizations (
id uuid PRIMARY KEY,
customer_id uuid REFERENCES customers (id),
[ "create type compliance_types as enum ('manual', 'sanctions', 'sanctions_override')",
`create table compliance_authorizations (
id uuid PRIMARY KEY,
customer_id uuid REFERENCES customers (id),
compliance_type compliance_types NOT NULL,
authorized_at timestamptz NOT NULL,
authorized_by text REFERENCES user_tokens (token) )` ]
db.multi(sql, next)
};
}
exports.down = function(next) {
next();
};
exports.down = function (next) {
next()
}