2020-10-12 20:51:35 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Console\Commands\Overrides;
|
|
|
|
|
|
|
|
use Pterodactyl\Console\RequiresDatabaseMigrations;
|
|
|
|
use Illuminate\Database\Console\Seeds\SeedCommand as BaseSeedCommand;
|
|
|
|
|
|
|
|
class SeedCommand extends BaseSeedCommand
|
|
|
|
{
|
|
|
|
use RequiresDatabaseMigrations;
|
|
|
|
|
|
|
|
/**
|
2021-01-23 14:12:15 -08:00
|
|
|
* Block someone from running this seed command if they have not completed
|
|
|
|
* the migration process.
|
2020-10-12 20:51:35 -07:00
|
|
|
*/
|
2021-01-23 15:52:57 -08:00
|
|
|
public function handle()
|
2020-10-12 20:51:35 -07:00
|
|
|
{
|
2021-01-23 12:33:34 -08:00
|
|
|
if (!$this->hasCompletedMigrations()) {
|
2021-01-23 15:52:57 -08:00
|
|
|
$this->showMigrationWarning();
|
|
|
|
|
|
|
|
return;
|
2020-10-12 20:51:35 -07:00
|
|
|
}
|
|
|
|
|
2021-01-23 15:52:57 -08:00
|
|
|
parent::handle();
|
2020-10-12 20:51:35 -07:00
|
|
|
}
|
|
|
|
}
|