Skip to content

Commit

Permalink
add nonce migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Xziy committed May 5, 2024
1 parent 2016b53 commit c7adb86
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions migrations/20240505080859-add-nonce.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
'use strict';
// sql template autogenerated by gen-db-migrates

var async = require('async')
var dbm;
var type;
var seed;

/**
* We receive the dbmigrate dependency from dbmigrate initially.
* This enables us to not have to rely on NODE_PATH.
*/
exports.setup = function(options, seedLink) {
dbm = options.dbmigrate;
type = dbm.dataType;
seed = seedLink;
};

exports.up = function (db, callback) {
async.series([
(cb) => db.addColumn('order', 'nonce', {"type":"real","defaultValue":0}, cb),
(cb) => db.addColumn('order', 'hash', {"type":"text"}, cb),

], callback);
}

exports.down = function(db) {
return null;
};

exports._meta = {
"version": 1
};

0 comments on commit c7adb86

Please sign in to comment.