Skip to content

Commit

Permalink
feat: add index for wallet_id in token
Browse files Browse the repository at this point in the history
  • Loading branch information
dadiorchen committed Aug 18, 2021
1 parent cb02ef5 commit 0d1389f
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions database/migrations/20210818020849-CreateIndexTokenWalletId.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

let dbm;
let type;
let 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) {
return db.runSql('create index token_wallet_id_idx on token(wallet_id)');
};

exports.down = function(db) {
return db.runSql('drop index token_wallet_id_idx');
};

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

0 comments on commit 0d1389f

Please sign in to comment.