Every instance of sqlite database should have foreign_keys constraints on

This commit is contained in:
2019-12-22 13:14:12 +01:00
parent 720fb69648
commit ddb7e7379d

View File

@@ -6,6 +6,7 @@ class SqliteDatabase {
constructor(host) {
this.host = host;
this.connection = new sqlite3.Database(this.host);
this.execute('pragma foreign_keys = on;');
this.schemaDirectory = path.join(__dirname, 'schemas');
}