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

Commit 536d0537 by Sascha Depold

migrations

1 parent 09a9f780
Showing with 10 additions and 2 deletions
...@@ -20,9 +20,13 @@ module.exports = (function() { ...@@ -20,9 +20,13 @@ module.exports = (function() {
return new Utils.CustomEventEmitter(function(emitter) { return new Utils.CustomEventEmitter(function(emitter) {
getLastMigrationId.call(self).success(function(migrationId) { getLastMigrationId.call(self).success(function(migrationId) {
migrationId = migrationId || '19700101000000' migrationId = migrationId || '19700101000000'
console.log(migrationId)
var nonMigratedFiles = getMigrationsFilesSince.call(self, migrationId) var nonMigratedFiles = getMigrationsFilesSince.call(self, migrationId)
console.log(nonMigratedFiles)
nonMigratedFiles.forEach(function(file) {
executeMigration.call(self, self.options.path + '/' + file)
})
emitter.emit('success') emitter.emit('success')
}) })
}).run() }).run()
...@@ -30,6 +34,10 @@ console.log(migrationId) ...@@ -30,6 +34,10 @@ console.log(migrationId)
// private // private
var executeMigration = function(path) {
console.log(path)
}
var getLastMigrationId = function() { var getLastMigrationId = function() {
var self = this var self = this
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!