1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Prevent setup from overwriting exisitng database

This commit is contained in:
Hillel Coren 2018-01-23 13:07:18 +02:00
parent eed29c0180
commit 58d1378a10

View File

@ -122,6 +122,10 @@ class AppController extends BaseController
fwrite($fp, $config);
fclose($fp);
if (Utils::isDatabaseSetup()) {
return Redirect::to('/login');
}
// == DB Migrate & Seed == //
$sqlFile = base_path() . '/database/setup.sql';
DB::unprepared(file_get_contents($sqlFile));