Permalink
Browse files

Merge pull request #6 from phunkwork/master

Compatibility with newer mysql-npm version
  • Loading branch information...
rsandor committed May 20, 2011
2 parents dd5d07f + 9cb0db7 commit efda5957c0c68f40011efc8029f43a579fae7ca6
Showing with 7 additions and 1 deletion.
  1. +7 −1 migrate.js
View
@@ -640,7 +640,13 @@ function fetch_migration_info(callback) {
// Find the index of the last migration
if (result.length > 0) {
- var last_migration = result[0][0];
+ var last_migration;
+ if (result[0].version) {
+ last_migration = result[0].version;
+ } else {
+ last_migration = result[0][0];
+ }
+
for (var i = 0; i < files.length; i++) {
if (files[i].match(last_migration)) {
migration_index = i;

0 comments on commit efda595

Please sign in to comment.