Error when trying to add a column (Error checking foreign keys after table modification)
(1) By zappfinger on 2021-03-25 12:41:23 [link] [source]
I am using DB Browser for SQLite (on Linux Mint). When I try to add a column to an existing table (via Modify table/Add field) I get "Error checking foreign keys after table modification. The changes will be reverted" When I add the column via the sqlite3 command prompt there is no problem
The db browser software isn't written or maintained by the sqlite team, so you'd want to find the maintainers of that software and give them a detailed minimal reproducible example.
To add to what Donal said, note that SQLite3 will happily create a Schema that contains unresolved foreign keys, and also that it may start with foreign-key checking turned OFF (depending on how it was compiled).
I am not involved with DB Browser itself, but as a maintainer of another SQLite admin software, my guess is that:
DB Browser is starting up and switching foreign key checking on immediately for you,
It also checks the foreign keys and schema accuracy after changes for you and does you the favor of failing when the change breaks it.
These are pure guesses, you need to ask the DB Browser people, but I'm mentioning it since I doubt that it is a bug - probably works as intended.