p-baleine / grunt-knex-migrate

Grunt task for knex's migrate
10 stars 14 forks source link

Enforce knex version to 0.5.x #3

Open xaka opened 10 years ago

xaka commented 10 years ago

Latest knex (0.6.x) somehow doesn't play well so we need to make sure we're using 0.5.x I didn't have much time to investigate, but it cannot find migrations where they really are. I rolled back to 0.5.x and it helped.

P.S. We probably should move it to peerDependencies and do not use/keep local copy.

tobobo commented 10 years ago

Ahh, glad I found this before it drove me too crazy—migrations weren't working on a new heroku app. Should have guessed that some kind of update was the culprit. I'll see if I can look into a knex 0.6 workaround if I get some time this weekend...

zcei commented 9 years ago

I dived into the code today, as I want to use knex migrations at work.

The actual 'problem' for the tests is, that the knex_migrations table isn't created together with a migration. When we first call this.conn.migrate.currentVersion() (which implicitly invokes Migrator.prototype._ensureTable) everything seems to work.

Will now clean-up the code & submit a PR later on.