Move the settings into a yml seed file and sync during install/update

This commit is contained in:
Nabeel Shahzad
2018-09-02 13:18:32 -04:00
parent 1c1c0d55f4
commit f14f7c1a5e
7 changed files with 332 additions and 368 deletions

View File

@@ -41,11 +41,10 @@ class UpdaterController extends Controller
{
$migrations = $this->migrationSvc->migrationsAvailable();
if(\count($migrations) > 0) {
return view('installer::update/steps/step1-update-available');
Log::info('No migrations found');
}
Log::info('No migrations found');
return view('installer::update/steps/step1-no-update');
return view('installer::update/steps/step1-update-available');
}
/**
@@ -57,9 +56,12 @@ class UpdaterController extends Controller
{
Log::info('Update: run_migrations', $request->post());
// Resync all of the settings
$this->migrationSvc->updateAllSettings();
$migrations = $this->migrationSvc->migrationsAvailable();
if(\count($migrations) === 0) {
return redirect(route('update.complete'));
return view('installer::update/steps/step3-update-complete');
}
$output = $this->migrationSvc->runAllMigrations();