I was curious and literally typed "halp! my sqlite is ignoring foreign keys why?!??" into Gemma 4 (like, a local model that can run on like a high-end MacBook) and it correctly answered the question and offered a solution.
Yeah, I might have stated this wrong. But create SQLite code using any AI and it will not do this correctly from the get go (at least it didn't for me, and I had to explicitly tell it to do those things). Googling the issue might uncover it, but that lives on the premise that the developer found the production issue (that might have lingered for some time perhaps) and then immediately found out that the reason was SQLite not honoring foreign keys.
The idea that fixing the issue once you've found the actual reason for the error is easy is a stupid argument. My argument is that this entire behavior flies in the face of principle of least astonishment and for most developers I don't think blaming SQLite is their first avenue of action, which is what "halp! my sqlite is ignoring foreign keys why?!??" is based on. When you're at that point you've probably already been pulling your hair for hours.
That's fair, I doubt Gemma would at the pragma by default. To be fair I use SQLite in a game framework thing and this was an inconvenience. I'm not sure of the right solution, though, from an API and backwards compatible perspective.
View all comments
Show parent comment
-2
u/veiva Jul 16 '26
Not taking a side, just:
I was curious and literally typed "halp! my sqlite is ignoring foreign keys why?!??" into Gemma 4 (like, a local model that can run on like a high-end MacBook) and it correctly answered the question and offered a solution.