Update Admin\Install #10

This commit is contained in:
Visman 2021-12-23 16:58:07 +07:00
parent efae0295e4
commit 47ee32f4da

View file

@ -506,12 +506,17 @@ class Install extends Admin
break; break;
case 'sqlite': case 'sqlite':
$this->c->DB_DSN = "sqlite:!PATH!{$dbname}"; $this->c->DB_DSN = "sqlite:!PATH!{$dbname}";
$this->c->DB_OPTS_AS_STR = '\\PDO::ATTR_TIMEOUT => 5, /* \'initSQLCommands\' => [\'PRAGMA journal_mode=WAL\',], */'; $this->c->DB_OPTS_AS_STR = "\n"
. ' \\PDO::ATTR_TIMEOUT => 5,' . "\n"
. ' /* \'initSQLCommands\' => [\'PRAGMA journal_mode=WAL\',], */' . "\n"
. ' \'initFunction\' => function ($db) {return $db->sqliteCreateFunction(\'CONCAT\', function (...$args) {return \\implode(\'\', $args);});},' . "\n"
. ' ';
$this->c->DB_OPTIONS = [ $this->c->DB_OPTIONS = [
PDO::ATTR_TIMEOUT => 5, PDO::ATTR_TIMEOUT => 5,
'initSQLCommands' => [ 'initSQLCommands' => [
'PRAGMA journal_mode=WAL', 'PRAGMA journal_mode=WAL',
], ],
'initFunction' => function ($db) {return $db->sqliteCreateFunction('CONCAT', function (...$args) {return \implode('', $args);});},
]; ];
break; break;