Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Compatibility with newer mysql-npm version #6

Merged
merged 1 commit into from

2 participants

Andreas Wolff Ryan Sandor Richards
Andreas Wolff

The latest mysql npm version (0.9.1) delivers the query results in the form of [ { version: 20110518151732 } ]. This patch checks the format and reads the last_migration accordingly..

Ryan Sandor Richards rsandor merged commit efda595 into from
Ryan Sandor Richards
Owner

Sweet, thanks for handling that :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 migrate.js
8 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;
Something went wrong with that request. Please try again.