knex/lib/migrate/migrate-stub.js

21 lines
520 B
JavaScript
Raw Normal View History

2013-12-27 14:44:21 -05: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.
2015-05-09 14:01:19 -04:00
"use strict";
2015-05-09 13:58:18 -04:00
var StubMigrate = module.exports = function () {};
2013-12-27 14:44:21 -05:00
2015-05-09 14:01:19 -04:00
var Promise = require("bluebird");
2015-05-09 13:58:18 -04:00
var noSuchMethod = Promise.method(function () {
2015-05-09 14:01:19 -04:00
throw new Error("Migrations are not supported");
2013-12-27 14:44:21 -05:00
});
StubMigrate.prototype = {
make: noSuchMethod,
latest: noSuchMethod,
rollback: noSuchMethod,
currentVersion: noSuchMethod
2015-05-09 13:58:18 -04:00
};