log("🔄 Converting site groups status from ENUM to VARCHAR for Google Sheets integration"); // Convert status from ENUM to VARCHAR(50) to support all Google Sheets status values // Following project preference for VARCHAR over ENUM as documented in DATABASE_SOFT_DELETE_GUIDE.md $sql = "ALTER TABLE advertising_site_groups MODIFY COLUMN status VARCHAR(50) NOT NULL DEFAULT 'active'"; $this->db->query($sql); $this->log("✅ Site groups status converted to VARCHAR(50) successfully"); $this->log("📝 Now supports all Google Sheets status values without ENUM limitations"); } public function down(): void { $this->log("🔄 Reverting site groups status to original ENUM values"); // First, update any non-standard status values to 'inactive' $this->db->query("UPDATE advertising_site_groups SET status = 'inactive' WHERE status NOT IN ('active', 'inactive', 'pending')"); // Revert to original enum (though project prefers VARCHAR) $sql = "ALTER TABLE advertising_site_groups MODIFY COLUMN status ENUM('active','inactive','pending') NOT NULL DEFAULT 'active'"; $this->db->query($sql); $this->log("✅ Site groups status reverted to original ENUM (not recommended)"); } public function getDescription(): string { return "Convert site groups status from ENUM to VARCHAR(50) for Google Sheets integration"; } }