east
Version:
node.js database migration tool for mongodb, sqlite, postgres, mysql, couchbase
15 lines (14 loc) • 411 B
JavaScript
module.exports = function getMigrationNames(status) {
return Promise.resolve()
.then(() => {
if (status === 'all') {
return this.getAllMigrationNames();
} else if (status === 'executed') {
return this.adapter.getExecutedMigrationNames();
} else if (status === 'new') {
return this.getNewMigrationNames();
} else {
throw new Error(`Unrecognized status "${status}"`);
}
});
};