fix: restaurar migraciones del turnero perdidas por force push
- 20260626_activar_numero_turnero.php - 20260626_turnero_canal_conversations.sql Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
1574f12275
commit
bb6ee12e0a
@@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Migración: Activar número WhatsApp del Turnero
|
||||||
|
* Phone Number ID: 1154129601114656
|
||||||
|
* Ya registrado en Meta — solo queda guardarlo en system_config.
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once __DIR__ . '/../config/config.php';
|
||||||
|
|
||||||
|
try {
|
||||||
|
saveConfigToDB('whatsapp_phone_number_id_turnero', '1154129601114656');
|
||||||
|
echo "OK: whatsapp_phone_number_id_turnero = 1154129601114656\n";
|
||||||
|
} catch (Exception $e) {
|
||||||
|
echo "ERROR: " . $e->getMessage() . "\n";
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
-- Migración: agregar columna `canal` a la tabla conversations
|
||||||
|
-- Permite distinguir mensajes del bot (canal='bot') del turnero (canal='turnero')
|
||||||
|
-- Todos los registros existentes quedan como 'bot' (sin pérdida de datos)
|
||||||
|
|
||||||
|
ALTER TABLE `conversations`
|
||||||
|
ADD COLUMN IF NOT EXISTS `canal` VARCHAR(20) NOT NULL DEFAULT 'bot' AFTER `status`;
|
||||||
|
|
||||||
|
ALTER TABLE `conversations`
|
||||||
|
ADD INDEX IF NOT EXISTS `idx_conversations_canal` (`canal`);
|
||||||
Reference in New Issue
Block a user