Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
module.exports = function migrate (cb) {
postgrator.setConfig({
migrationDirectory: './scripts/database/pg/migrations',
driver: 'pg',
host: config['postgresql-store'].host,
database: config['postgresql-store'].name,
username: config['postgresql-store'].username,
password: config['postgresql-store'].password
});
postgrator.migrate('max', function (err, migrations) {
postgrator.endConnection(function () {
return cb(err, migrations);
});
});
};