knex: Sqlite schema builder dropForeign is missing

Sqlite dropUnique method is missing inside https://github.com/tgriesser/knex/blob/d40e578cadfc12c18ca21fbf436f64f9e36e6079/src/dialects/sqlite3/schema/tablecompiler.js, is it something intentional?

It is inherting from the base tablecompiler which throws an error Method implemented in the dialect driver.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

@rhys-vdw It seems like there is no easy way to drop foreign key constraints from SQLITE.

I am more than happy to submit a PR but want to confirm is there something you have already thought about?

Actually, now I look, the main problem is that you can’t drop a column in SQLite which has a foreign key. If I could get past that, I’d maybe be able to work around by adding a new column and copying data. That truly is a bug, but it’s a different one (the driver is generating bad SQL) so I’ll make a new issue for that.