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:
Tau 2019-10-27 09:34:31 -04:00
parent fa45169b96
commit 3aee0f611c

View File

@ -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 {