mirror of
https://github.com/djhackersdev/minime.git
synced 2026-04-25 08:06:45 -05:00
sql/sqlite.ts: Make FK constraints do something
They don't by default, because they didn't in older versions of SQLite and some older applications might rely on that. You have to send an explicit pragma prior to opening a transaction to make them take effect.
This commit is contained in:
parent
fa45169b96
commit
3aee0f611c
|
|
@ -92,6 +92,7 @@ class SqliteDataSource implements DataSource {
|
|||
const db = new Database(this._path);
|
||||
|
||||
db.defaultSafeIntegers();
|
||||
db.prepare("pragma foreign_keys = on").run();
|
||||
db.prepare("begin").run();
|
||||
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user