Skip to content

Commit 0b15d4d

Browse files
committed
Only configure DB if we have one
1 parent e7cd9c6 commit 0b15d4d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/NativeServiceProvider.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ public function rewriteDatabase()
128128

129129
config(['database.default' => 'nativephp']);
130130

131-
DB::statement('PRAGMA journal_mode=WAL;');
132-
DB::statement('PRAGMA busy_timeout=5000;');
131+
if (file_exists($databasePath)) {
132+
DB::statement('PRAGMA journal_mode=WAL;');
133+
DB::statement('PRAGMA busy_timeout=5000;');
134+
}
133135
}
134136

135137
public function removeDatabase()

0 commit comments

Comments
 (0)