diff --git a/migrations/008-add-two-way.js b/migrations/008-add-two-way.js index 5051e897..381c4486 100644 --- a/migrations/008-add-two-way.js +++ b/migrations/008-add-two-way.js @@ -12,7 +12,7 @@ exports.up = function (next) { 'alter table transactions add dispensed boolean NOT NULL DEFAULT false', 'alter table transactions add notified boolean NOT NULL DEFAULT false', 'alter table transactions add redeem boolean NOT NULL DEFAULT false', - 'alter table transactions add confirmation_time timestamp', + 'alter table transactions add confirmation_time timestamptz', 'alter table transactions add status status_stage NOT NULL DEFAULT \'notSeen\'' ] db.multi(sql, next) diff --git a/migrations/009-update-timestamps.js b/migrations/009-update-timestamps.js new file mode 100644 index 00000000..34bc56f1 --- /dev/null +++ b/migrations/009-update-timestamps.js @@ -0,0 +1,17 @@ +var db = require('./db') + +exports.up = function (next) { + var sql = [ + 'alter table transactions alter created type timestamptz', + 'alter table bills alter created type timestamptz', + 'alter table dispenses alter created type timestamptz', + 'alter table machine_events alter created type timestamptz', + 'alter table pairing_tokens alter created type timestamptz', + 'alter table pending_transactions alter updated type timestamptz' + ] + db.multi(sql, next) +} + +exports.down = function (next) { + next() +}