Foreign Key constraint doesn’t work
Are you sure foreign key support is enabled? Assuming the library is compiled with foreign key constraints enabled, it must still be enabled by the application at runtime, using the PRAGMA foreign_keys command. For example: sqlite> PRAGMA foreign_keys = ON;