knex/src/migrate/migrate-stub.js

19 lines
420 B
JavaScript
Raw Normal View History

2015-05-09 13:58:18 -04:00
// Stub Migrate:
// Used for now in browser builds, where filesystem access isn't
// available.
const StubMigrate = module.exports = function() {};
2015-05-09 13:58:18 -04:00
import Promise from 'bluebird';
2015-05-09 13:58:18 -04:00
const noSuchMethod = Promise.method(function() {
2015-05-09 13:58:18 -04:00
throw new Error("Migrations are not supported");
});
StubMigrate.prototype = {
make: noSuchMethod,
latest: noSuchMethod,
rollback: noSuchMethod,
currentVersion: noSuchMethod
};