Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Compatibility with newer mysql-npm version #6

Merged
merged 1 commit into from May 20, 2011
Jump to file or symbol
Failed to load files and symbols.
+7 −1
Split
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;