mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-08 17:54:30 -04:00
Prevent setup from overwriting exisitng database
This commit is contained in:
parent
26e6495037
commit
bf47219ed6
@ -122,6 +122,10 @@ class AppController extends BaseController
|
|||||||
fwrite($fp, $config);
|
fwrite($fp, $config);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
if (Utils::isDatabaseSetup()) {
|
||||||
|
return Redirect::to('/login');
|
||||||
|
}
|
||||||
|
|
||||||
// == DB Migrate & Seed == //
|
// == DB Migrate & Seed == //
|
||||||
$sqlFile = base_path() . '/database/setup.sql';
|
$sqlFile = base_path() . '/database/setup.sql';
|
||||||
DB::unprepared(file_get_contents($sqlFile));
|
DB::unprepared(file_get_contents($sqlFile));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user