Skip to content

Commit 5bb2e17

Browse files
authored
fix: database migration on first launch (#439)
1 parent 8bbef24 commit 5bb2e17

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/NativeServiceProvider.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ public function packageRegistered()
8484
}
8585
}
8686

87+
public function bootingPackage()
88+
{
89+
if (config('nativephp-internal.running')) {
90+
$this->rewriteDatabase();
91+
}
92+
}
93+
8794
protected function configureApp()
8895
{
8996
if (config('app.debug')) {
@@ -94,8 +101,6 @@ protected function configureApp()
94101

95102
$this->rewriteStoragePath();
96103

97-
$this->rewriteDatabase();
98-
99104
$this->configureDisks();
100105

101106
config(['session.driver' => 'file']);

0 commit comments

Comments
 (0)