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

marianomerlo picture marianomerlo  路  3Comments

hyperh picture hyperh  路  3Comments

fsebbah picture fsebbah  路  3Comments

mattgrande picture mattgrande  路  3Comments

nklhrstv picture nklhrstv  路  3Comments