mirror of
				https://github.com/pelican-dev/panel.git
				synced 2025-11-03 05:56:52 +01:00 
			
		
		
		
	* make sure migrations ran * add loading indicator to finish button * make error notification persistent * fix migration checker * cleanup traits
		
			
				
	
	
		
			27 lines
		
	
	
		
			571 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
		
			571 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
namespace App\Console\Commands\Overrides;
 | 
						|
 | 
						|
use App\Traits\Commands\RequiresDatabaseMigrations;
 | 
						|
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
 | 
						|
 | 
						|
class UpCommand extends BaseUpCommand
 | 
						|
{
 | 
						|
    use RequiresDatabaseMigrations;
 | 
						|
 | 
						|
    /**
 | 
						|
     * Block someone from running this up command if they have not completed
 | 
						|
     * the migration process.
 | 
						|
     */
 | 
						|
    public function handle(): int
 | 
						|
    {
 | 
						|
        if (!$this->hasCompletedMigrations()) {
 | 
						|
            $this->showMigrationWarning();
 | 
						|
 | 
						|
            return 1;
 | 
						|
        }
 | 
						|
 | 
						|
        return parent::handle();
 | 
						|
    }
 | 
						|
}
 |