Adds Foreign Key Support.
Issue #217
duplicate
Originally reported on Google Code with ID 217
Adds foreign key support by turning foreign_keys pragma to on after the initial database
connection. This PRAGMA statement should be ignored by SQLite databases less then 3.6.19.
http://www.sqlite.org/foreignkeys.html#fk_enable
Reported by Dygear
on 2013-05-25 07:45:37
<hr> * Attachment: phpliteadmin.php.patch
Comments (4)
-
-
Account Deleted That's the odd thing about FK support within SQLite. There is really no direct way to detect it from what I'm seeing. We'd have to call #PRAGMA compile_options; and then parse it to see that it does not have OMIT_FOREIGN_KEY set. That's the hacky solution that I can see, if you know of a direct yes / no please do let me know.
Reported by
Dygear
on 2013-06-04 22:00:54 -
Well, detecting if FK support is at least available does not really help us. Because by default, FK support is disabled and people might use a db where FK constraints are defined but they don't want them to be enforced. Of course it does not make any sense to define FK constraints and not use them, but people might do so and rely on the fact that SQLite does not enforce them by default. Checking whether FK support is available in the SQLite library is not really necessary as I think the PRAGMA does not do any harm if it is not available.
Reported by
crazy4chrissi
on 2013-06-05 07:28:18 -
Reported by
crazy4chrissi
on 2013-12-25 16:19:48 - Status changed:Duplicate
- Merged into:#81 - Log in to comment
Reported by
crazy4chrissi
on 2013-06-04 21:18:48 - Status changed:Accepted
- Labels added: Type-Enhancement - Labels removed: Type-Patch