diff --git a/lib/sources/npi/index.js b/lib/sources/npi/index.js index bf3d3e3..c3af115 100644 --- a/lib/sources/npi/index.js +++ b/lib/sources/npi/index.js @@ -6,6 +6,9 @@ var shelljs = require('shelljs'), logger = require('../../logger').data; module.exports = { + + // fetches pending migrations + // and runs them update: function () { logger.info('updating NPI datasources'); return sourceMeta.updating('NPI') diff --git a/lib/sources/npi/monthly/indexer.js b/lib/sources/npi/monthly/indexer.js index c0a7f75..3a63258 100644 --- a/lib/sources/npi/monthly/indexer.js +++ b/lib/sources/npi/monthly/indexer.js @@ -18,4 +18,4 @@ module.exports = { // actually create the indices with SQL using the pg driver return Q.ninvoke(pg, 'query', indicesSql); } -} +} \ No newline at end of file diff --git a/make.js b/make.js index ea25db3..93b861e 100644 --- a/make.js +++ b/make.js @@ -15,6 +15,7 @@ target.all = function () { var Q = require('q'); Q.longStackSupport = true; +// calls npi#update target.fetch = function () { var pg = require('./lib/sources/pg'), npi = require('./lib/sources/npi'); @@ -31,6 +32,8 @@ target.fetch = function () { }); }; +// creates the database and calls +// npi#update target.bootstrap = function () { var pg = require('./lib/sources/pg'), npi = require('./lib/sources/npi'),