Do not allow running the up or seed commands if migrations have not been run

This commit is contained in:
Dane Everitt 2020-10-12 20:51:35 -07:00
parent d5f2242c89
commit 49ddd63dbd
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
3 changed files with 110 additions and 0 deletions

View 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();
}
}