From b80b81fe8417a729346037783eb4ecfeebc027ca Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Fri, 10 Jul 2026 10:55:25 -0500 Subject: [PATCH] =?UTF-8?q?Temp:=20script=20migraci=C3=B3n=20para=20regist?= =?UTF-8?q?rar=20lab=5Ftomas=5Fconfig=20en=20sidebar=20(auto-elimina=20al?= =?UTF-8?q?=20ejecutar)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- _run_migration_tomas.php | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 _run_migration_tomas.php diff --git a/_run_migration_tomas.php b/_run_migration_tomas.php new file mode 100644 index 0000000..20f030d --- /dev/null +++ b/_run_migration_tomas.php @@ -0,0 +1,39 @@ +getConnection(); + +$row = $pdo->query("SELECT MAX(sort_order) AS mx FROM system_modules WHERE category = 'clinico'")->fetch(PDO::FETCH_ASSOC); +$nextOrder = (int)($row['mx'] ?? 50) + 10; + +$pdo->prepare(" + INSERT INTO system_modules (slug, name, icon, category, route, is_active, sort_order, description) + VALUES (?, ?, ?, ?, ?, 1, ?, ?) + ON DUPLICATE KEY UPDATE + name=VALUES(name), icon=VALUES(icon), category=VALUES(category), + route=VALUES(route), is_active=1, sort_order=VALUES(sort_order), description=VALUES(description) +")->execute([ + 'lab_tomas_config', + 'Tipos de Examen (Tomas)', + 'fas fa-vials', + 'clinico', + '/lab_tomas_config.php', + $nextOrder, + 'Configurar tipos de examen y ciclos de tomas prolongadas (F-LAB-28)', +]); + +// Auto-eliminar el script +@unlink(__FILE__); + +echo '

+ ✅ Módulo lab_tomas_config registrado en system_modules (sort_order='.$nextOrder.').
+ Este archivo fue eliminado automáticamente.

+ Ir a Tipos de Examen → +

';