2020-10-13 03:51:35 +00: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 22:12:15 +00:00
|
|
|
* Block someone from running this seed command if they have not completed
|
|
|
|
* the migration process.
|
2020-10-13 03:51:35 +00:00
|
|
|
*/
|
2021-10-30 20:41:38 +00:00
|
|
|
public function handle(): int
|
2020-10-13 03:51:35 +00:00
|
|
|
{
|
2021-01-23 20:33:34 +00:00
|
|
|
if (!$this->hasCompletedMigrations()) {
|
2021-01-23 23:52:57 +00:00
|
|
|
$this->showMigrationWarning();
|
|
|
|
|
2021-10-30 20:41:38 +00:00
|
|
|
return 1;
|
2020-10-13 03:51:35 +00:00
|
|
|
}
|
|
|
|
|
2021-10-30 20:41:38 +00:00
|
|
|
return parent::handle();
|
2020-10-13 03:51:35 +00:00
|
|
|
}
|
|
|
|
}
|