Remove migrate:begin/commit/rollback references, unify to migrate command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2026-01-28 22:03:06 +00:00
parent 2ff2609971
commit 63816a7993
8 changed files with 59 additions and 58 deletions

View File

@@ -14,7 +14,7 @@ use Illuminate\Support\Facades\DB;
* - Always allowed if IS_FRAMEWORK_DEVELOPER=true
* - In development mode: allowed for manual execution, blocked for Claude Code
* - In production mode: always blocked
* - Must be in migration mode (migrate:begin) unless IS_FRAMEWORK_DEVELOPER=true
* - Must be in migration mode unless IS_FRAMEWORK_DEVELOPER=true
*/
class Reset_Command extends Command
{
@@ -67,17 +67,16 @@ class Reset_Command extends Command
// Require migration mode for non-framework developers
if (!$in_migration_mode) {
$this->error(' migrate:reset requires migration mode to be active.');
$this->error('[ERROR] migrate:reset requires migration mode to be active.');
$this->newLine();
$this->warn('Database reset protection:');
$this->line('This command can only be run within a migration session to ensure');
$this->line('you have a snapshot to restore if something goes wrong.');
$this->newLine();
$this->info('To reset the database:');
$this->line('1. Start migration mode: php artisan migrate:begin');
$this->line('2. Reset database: php artisan migrate:reset');
$this->line('3. Run migrations: php artisan migrate');
$this->line('4. Commit or rollback: php artisan migrate:commit');
$this->info('Note:');
$this->line('In development mode, "php artisan migrate" automatically creates');
$this->line('snapshots and manages rollback. This command is only needed for');
$this->line('full database drops, which is rarely necessary.');
$this->newLine();
return 1;
}