不要怂,就是干,撸起袖子干!

Commit ad2661d0 by Jan Aagaard Meier

Merge pull request #1087 from webcast-io/feature/export-migrator-helpers

Make available migrator helpers
2 parents c96e3d22 622e1e33
Showing with 6 additions and 6 deletions
...@@ -233,7 +233,7 @@ module.exports = (function() { ...@@ -233,7 +233,7 @@ module.exports = (function() {
// private // private
var getLastMigrationFromDatabase = function() { var getLastMigrationFromDatabase = Migrator.prototype.getLastMigrationFromDatabase = function() {
var self = this var self = this
return new Utils.CustomEventEmitter(function(emitter) { return new Utils.CustomEventEmitter(function(emitter) {
...@@ -255,7 +255,7 @@ module.exports = (function() { ...@@ -255,7 +255,7 @@ module.exports = (function() {
}).run() }).run()
} }
var getLastMigrationIdFromDatabase = function() { var getLastMigrationIdFromDatabase = Migrator.prototype.getLastMigrationIdFromDatabase = function() {
var self = this var self = this
return new Utils.CustomEventEmitter(function(emitter) { return new Utils.CustomEventEmitter(function(emitter) {
...@@ -270,7 +270,7 @@ module.exports = (function() { ...@@ -270,7 +270,7 @@ module.exports = (function() {
}).run() }).run()
} }
var getFormattedDateString = function(s) { var getFormattedDateString = Migrator.prototype.getFormattedDateString = function(s) {
var result = null var result = null
try { try {
...@@ -282,11 +282,11 @@ module.exports = (function() { ...@@ -282,11 +282,11 @@ module.exports = (function() {
return result return result
} }
var stringToDate = function(s) { var stringToDate = Migrator.prototype.stringToDate = function(s) {
return moment(getFormattedDateString(s), "YYYYMMDDHHmmss") return moment(getFormattedDateString(s), "YYYYMMDDHHmmss")
} }
var saveSuccessfulMigration = function(from, to, callback) { var saveSuccessfulMigration = Migrator.prototype.saveSuccessfulMigration = function(from, to, callback) {
var self = this var self = this
self.findOrCreateSequelizeMetaDAO().success(function(SequelizeMeta) { self.findOrCreateSequelizeMetaDAO().success(function(SequelizeMeta) {
...@@ -296,7 +296,7 @@ module.exports = (function() { ...@@ -296,7 +296,7 @@ module.exports = (function() {
}) })
} }
var deleteUndoneMigration = function(from, to, callback) { var deleteUndoneMigration = Migrator.prototype.deleteUndoneMigration = function(from, to, callback) {
var self = this var self = this
self.findOrCreateSequelizeMetaDAO().success(function(SequelizeMeta) { self.findOrCreateSequelizeMetaDAO().success(function(SequelizeMeta) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!