Skip to content

Commit fd5860a

Browse files
authored
Enable WAL mode in SQLite (#405)
1 parent 3b2aa37 commit fd5860a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/NativeServiceProvider.php

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Console\Application as Artisan;
66
use Illuminate\Support\Arr;
7+
use Illuminate\Support\Facades\DB;
78
use Native\Laravel\Commands\FreshCommand;
89
use Native\Laravel\Commands\LoadPHPConfigurationCommand;
910
use Native\Laravel\Commands\LoadStartupConfigurationCommand;
@@ -122,6 +123,9 @@ public function rewriteDatabase()
122123
]]);
123124

124125
config(['database.default' => 'nativephp']);
126+
127+
DB::statement('PRAGMA journal_mode=WAL;');
128+
DB::statement('PRAGMA busy_timeout=5000;');
125129
}
126130

127131
public function removeDatabase()

0 commit comments

Comments
 (0)