Knex: sqlite .onDelete('CASCADE') not working

Created on 21 Jan 2014  ·  3Comments  ·  Source: knex/knex

Hi,

I'm trying to create a foreign key with ON DELETE CASCADE option, but with no luck. I have this in one of my migrations:

table.string('user_id', 36)
  .index()
  .references('id')
  .inTable('user')
  .onDelete('CASCADE');

The column appears and correctly references the foreign key, but its missing the ON DELETE CASCADE option.

bug

Most helpful comment

Fixed in 0.6

All 3 comments

Is this issue solved?

It is in the 0.6 branch. Should be ready within the week, it's fairly stable though if you want to try it out migrations are the only big piece missing.

Fixed in 0.6

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mishitpatel picture mishitpatel  ·  3Comments

zettam picture zettam  ·  3Comments

npow picture npow  ·  3Comments

sandrocsimas picture sandrocsimas  ·  3Comments

hyperh picture hyperh  ·  3Comments