-- INTERLINK WhatsApp v2.7.1 - Rollback lógico seguro
-- No borra mensajes, tickets, conversaciones ni conocimiento.
USE `interlink_crm`;

UPDATE `wa2_intent_examples`
SET `active`=0, `updated_at`=NOW()
WHERE `source_pack`='interlink_isp_v271';

UPDATE `wa2_ai_test_cases`
SET `active`=0, `updated_at`=NOW()
WHERE `source_pack`='interlink_isp_v271';

DELETE FROM `wa2_schema_migrations`
WHERE `migration_key`='wa2_v271_greeting_no_service_hotfix';

SELECT COUNT(*) AS ejemplos_v271_activos
FROM `wa2_intent_examples`
WHERE `source_pack`='interlink_isp_v271' AND `active`=1;
