From 3052fc774f516d73bae68e793f1d4b3ce97db183 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 19 May 2018 15:48:02 -0600 Subject: [PATCH] Update database.php --- resources/classes/database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/classes/database.php b/resources/classes/database.php index 19e2c7d6e8..add0a3bf51 100644 --- a/resources/classes/database.php +++ b/resources/classes/database.php @@ -132,8 +132,9 @@ include "root.php"; if (file_exists($this->path.'/'.$this->db_name)) { //connect to the database $this->db = new PDO('sqlite:'.$this->path.'/'.$this->db_name); //sqlite 3 - //enable foreign key constraints + //PRAGMA commands $this->db->query('PRAGMA foreign_keys = ON;'); + $this->db->query('PRAGMA journal_mode = wal;'); //add additional functions to SQLite so that they are accessible inside SQL //bool PDO::sqliteCreateFunction ( string function_name, callback callback [, int num_args] ) $this->db->sqliteCreateFunction('md5', 'php_md5', 1);