misc_pterodactyl-panel/app/Console/Commands/Overrides/UpCommand.php

27 lines
584 B
PHP
Raw Permalink Normal View History

<?php
namespace Pterodactyl\Console\Commands\Overrides;
use Pterodactyl\Console\RequiresDatabaseMigrations;
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
class UpCommand extends BaseUpCommand
{
use RequiresDatabaseMigrations;
/**
2021-01-23 22:12:15 +00:00
* Block someone from running this up command if they have not completed
* the migration process.
*/
public function handle(): int
{
2021-01-23 20:33:34 +00:00
if (!$this->hasCompletedMigrations()) {
$this->showMigrationWarning();
return 1;
}
2022-10-21 17:31:59 +00:00
return parent::handle() ?? 0;
}
}