selda icon indicating copy to clipboard operation
selda copied to clipboard

[selda-sqlite] foreign keys are off

Open plredmond opened this issue 1 year ago • 0 comments

Description

Foreign keys are off under the sqlite backend (version selda-sqlite-0.1.7.2), despite code meant to turn them on.

Steps to reproduce

  1. Make a file Main.hs with:

    import Database.Selda.SQLite
    
    main = withSQLite "test.db" $ return ()
    
  2. Run Main.hs.

  3. Do the following in the sqlite repl:

    $ sqlite3 
    SQLite version 3.45.3 2024-04-15 13:34:05
    ...
    sqlite> .open test.db
    sqlite> .dump
    PRAGMA foreign_keys=OFF;
    BEGIN TRANSACTION;
    COMMIT;
    sqlite> 
    
  • Expected result: Pragma foreign_keys is ON.
  • Actual result: Pragma foreign_keys is OFF.

plredmond avatar Dec 19 '24 14:12 plredmond