Fix enum column validation and migration data types

Remove numbered emoji and add no-emoji policy to CLAUDE.md

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
root
2025-10-21 07:33:24 +00:00
parent 9d44fcff55
commit faf34e1a9d
7 changed files with 41 additions and 23 deletions

View File

@@ -41,37 +41,37 @@ class Migrate_Rollback_Command extends Command
try {
// Step 1: Stop MySQL using supervisorctl
$this->info('1 Stopping MySQL server...');
$this->info('[1] Stopping MySQL server...');
shell_exec('supervisorctl stop mysql 2>&1');
// Wait a moment for process to die
sleep(3);
// Step 2: Clear current MySQL data
$this->info('2 Clearing current database data...');
$this->info('[2] Clearing current database data...');
// Use shell_exec to clear directory contents instead of removing directory
shell_exec("rm -rf {$this->mysql_data_dir}/* 2>/dev/null");
shell_exec("rm -rf {$this->mysql_data_dir}/.* 2>/dev/null");
// Step 3: Restore backup
$this->info('3 Restoring database snapshot...');
$this->info('[3] Restoring database snapshot...');
shell_exec("cp -r {$this->backup_dir}/* {$this->mysql_data_dir}/");
shell_exec("cp -r {$this->backup_dir}/.[^.]* {$this->mysql_data_dir}/ 2>/dev/null");
// Step 4: Fix permissions (MySQL needs to own the files)
$this->info('4 Setting correct permissions...');
$this->info('[4] Setting correct permissions...');
$this->run_command(['chown', '-R', 'mysql:mysql', $this->mysql_data_dir]);
// Step 5: Start MySQL using supervisorctl
$this->info('5 Starting MySQL server...');
$this->info('[5] Starting MySQL server...');
shell_exec('supervisorctl start mysql 2>&1');
// Step 6: Wait for MySQL to be ready
$this->info('6 Waiting for MySQL to be ready...');
$this->info('[6] Waiting for MySQL to be ready...');
$this->wait_for_mysql_ready();
// Step 7: Keep backup and flag - stay in migration mode
$this->info('7 Rollback complete...');
$this->info('[7] Rollback complete...');
// Success
$this->info('');