mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 06:43:45 +02:00
Do not allow running the up or seed commands if migrations have not been run
This commit is contained in:
23
app/Console/Commands/Overrides/UpCommand.php
Normal file
23
app/Console/Commands/Overrides/UpCommand.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Pterodactyl\Console\Commands\Overrides;
|
||||
|
||||
use Pterodactyl\Console\RequiresDatabaseMigrations;
|
||||
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
|
||||
|
||||
class UpCommand extends BaseUpCommand
|
||||
{
|
||||
use RequiresDatabaseMigrations;
|
||||
|
||||
/**
|
||||
* @return bool|int
|
||||
*/
|
||||
public function handle()
|
||||
{
|
||||
if (!$this->hasCompletedMigrations()) {
|
||||
return $this->showMigrationWarning();
|
||||
}
|
||||
|
||||
return parent::handle();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user