[DBD-SQLite] Removing the on-by-default referential integrity.
Dami Laurent (PJ)
laurent.dami at justice.ge.ch
Tue Nov 3 07:30:50 GMT 2009
>-----Message d'origine-----
>De : Darren Duncan [mailto:darren at darrenduncan.net]
>Envoyé : mardi, 3. novembre 2009 01:53
>
>2. Having foreign keys enabled by default would only affect
>people that are
>explicitly writing foreign key constraints into their SQL. So
>in general, why
>would people write those constraints but not expect them to be
>enforced? Maybe
>for documentation purposes, but in that case presumably they
>also had other
>means to keep their data clean, and if enforcing foreign keys
>becomes active
>that should not cause an immediate break if their replacement
>practices were
>doing their job.
The old SQLite doc had a page explaining how to enforce foreign key constraints through hand-written triggers (and there was a utility to generate SQL code for such triggers). So when upgrading to 1.27, applications who used this technique will have both their old-style triggers and the new-style builtin FK enforcement code, competing to implement FK constraints. I have no idea if both can live happily side-by-side.
Anyway it's not specific to DBD-SQLite, because the same question must be asked for plain SQLite applications. Was it ever mentioned in the Sqlite mailing list ?
Cheers, Laurent Dami
More information about the DBD-SQLite
mailing list