knex/src/migrate/migrate-stub.js

20 lines
504 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. Maybe we can eventually do websql migrations
// with jsonp and a json migration api.
var StubMigrate = module.exports = function() {};
var Promise = require('bluebird');
var noSuchMethod = Promise.method(function() {
throw new Error("Migrations are not supported");
});
StubMigrate.prototype = {
make: noSuchMethod,
latest: noSuchMethod,
rollback: noSuchMethod,
currentVersion: noSuchMethod
};