Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
pterodactyl
GitHub Repository: pterodactyl/panel
Path: blob/1.0-develop/app/Console/Commands/Overrides/UpCommand.php
7460 views
1
<?php
2
3
namespace Pterodactyl\Console\Commands\Overrides;
4
5
use Pterodactyl\Console\RequiresDatabaseMigrations;
6
use Illuminate\Foundation\Console\UpCommand as BaseUpCommand;
7
8
class UpCommand extends BaseUpCommand
9
{
10
use RequiresDatabaseMigrations;
11
12
/**
13
* Block someone from running this up command if they have not completed
14
* the migration process.
15
*/
16
public function handle(): int
17
{
18
if (!$this->hasCompletedMigrations()) {
19
$this->showMigrationWarning();
20
21
return 1;
22
}
23
24
return parent::handle() ?? 0;
25
}
26
}
27
28