Add transaction versioning, tx cancellation (#79)
This commit is contained in:
parent
4a97535dec
commit
500edcf279
15 changed files with 2223 additions and 1468 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue