Skip to content

Commit 94c115e

Browse files
committed
Fix Prohibitable trait usage in database console commands
- SeedCommand: switch from Hyperf's Prohibitable to Hypervel's - RollbackCommand: add missing Prohibitable trait (matches Laravel)
1 parent f50b876 commit 94c115e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/database/src/Console/Migrations/RollbackCommand.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
namespace Hypervel\Database\Console\Migrations;
66

77
use Hypervel\Console\ConfirmableTrait;
8+
use Hypervel\Console\Prohibitable;
89
use Hypervel\Database\Migrations\Migrator;
910

1011
class RollbackCommand extends BaseCommand
1112
{
1213
use ConfirmableTrait;
14+
use Prohibitable;
1315

1416
protected ?string $signature = 'migrate:rollback
1517
{--database= : The database connection to use}
@@ -33,7 +35,7 @@ public function __construct(
3335
*/
3436
public function handle(): int
3537
{
36-
if (! $this->confirmToProceed()) {
38+
if ($this->isProhibited() || ! $this->confirmToProceed()) {
3739
return self::FAILURE;
3840
}
3941

src/database/src/Console/SeedCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace Hypervel\Database\Console;
66

7-
use Hyperf\Command\Concerns\Prohibitable;
87
use Hyperf\Contract\ConfigInterface;
98
use Hypervel\Console\Command;
109
use Hypervel\Console\ConfirmableTrait;
10+
use Hypervel\Console\Prohibitable;
1111
use Hypervel\Database\ConnectionResolverInterface;
1212
use Hypervel\Database\Eloquent\Model;
1313
use Hypervel\Database\Seeder;

0 commit comments

Comments
 (0)