Prevent setup from overwriting exisitng database
This commit is contained in:
parent
26e6495037
commit
bf47219ed6
1 changed files with 4 additions and 0 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue