Enable Sqlite WAL mode by default
WAL provides more concurrency as readers do not block writers and, a writer does not block readers. Reading and writing can proceed concurrently. This change might reduce the number of errors related to locked databases. For reference: https://sqlite.org/wal.html
This commit is contained in:
committed by
Frédéric Guillot
parent
1e304f4ad6
commit
5e4d506b28
@@ -117,10 +117,11 @@ class DatabaseProvider implements ServiceProviderInterface
|
||||
{
|
||||
require_once __DIR__.'/../Schema/Sqlite.php';
|
||||
|
||||
return new Database(array(
|
||||
return new Database([
|
||||
'driver' => 'sqlite',
|
||||
'filename' => DB_FILENAME,
|
||||
));
|
||||
'wal_mode' => DB_WAL_MODE,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user