Ticket #1075 (closed defect: wontfix)

Opened 4 years ago

Last modified 4 years ago

lack of check about the value to use for existing columns at migration

Reported by: mozgurbayhan@… Owned by: andrew
Priority: major Milestone:
Component: commands Version: unknown
Keywords: Cc:


With sqllite db, south can take any value e.g(datetime.date.today()) as a foreign key value that can couse db corruption.

Change History

comment:1 Changed 4 years ago by andrew

  • Status changed from new to closed
  • Resolution set to wontfix

SQLite does not have any integrity checks for that - this is a problem with SQLite, not with South (other databases will raise this error at the database level), so marking this WONTFIX.

comment:2 Changed 4 years ago by mozgurbayhan@…

Is it hard to do that check at application layer?

comment:3 Changed 4 years ago by andrew

Yes, because we'd need to write code which reversed the foreign key constraint, obtained the field at the other end, and then tried to run the values through that (and even then that wouldn't catch all cases).

The default value used for existing columns is entirely manually specified, so we've made the fair assumption that you know what you're doing instead of complicating the codebase even further. South _could_ contain all manner of checks to prevent even the simplest of mistakes, but then it would be even bigger, more complex, and more unmaintanable.

Note: See TracTickets for help on using tickets.