db.runSql gives error when not using params as second argument in v0.6.0 #127

mpalmerlee opened this Issue Sep 15, 2013 · 3 comments

4 participants


In v0.5.4 this worked fine, my migration looks like this:

db.runSql(query, callback);

in v0.6.0 I get this error:

{ [Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?)' at line 1] code: 'ER_PARSE_ERROR', index: 0 }

I think it's expecting the params?


I get a similar issue...

This doesn't work (from mysql.js):

function writeMigrationRecord(db, migration, callback) {
db._runSql('INSERT INTO migrations (name, run_on) VALUES (?, ?)', [migration.name, new Date()], callback);

This does:

db._runSql('INSERT INTO migrations (name, run_on) VALUES (?, ?)', migration.name, new Date(), callback);


Fighting with same issue

@kunklejr kunklejr closed this in 80ac7c9 Sep 20, 2013

Fixed in v0.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment