Extra logs/skip module seed pending

This commit is contained in:
Nabeel Shahzad
2020-10-21 14:12:38 -04:00
parent cd18442207
commit 1c9d1c1733
2 changed files with 5 additions and 29 deletions

View File

@@ -4,6 +4,7 @@ namespace App\Services\Installer;
use App\Contracts\Service;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\Log;
class InstallerService extends Service
{
@@ -27,11 +28,14 @@ class InstallerService extends Service
*/
public function isUpgradePending(): bool
{
if (count($this->migrationSvc->migrationsAvailable()) > 0) {
$pendingMigrations = count($this->migrationSvc->migrationsAvailable());
if ($pendingMigrations > 0) {
Log::info('Found '.$pendingMigrations.' pending migrations, update available');
return true;
}
if ($this->seederSvc->seedsPending()) {
Log::info('Found seeds pending, update available');
return true;
}