From 0babb3c44a1f04510d9e5e4979ecad1d24adc2f4 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sun, 19 Apr 2026 21:14:45 -0500 Subject: [PATCH] Update run_003_turnero.php --- run_003_turnero.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/run_003_turnero.php b/run_003_turnero.php index 28834a5..9f10eac 100644 --- a/run_003_turnero.php +++ b/run_003_turnero.php @@ -9,9 +9,11 @@ * https://tu-dominio/run_003_turnero.php */ +// Cargar config primero para que MIGRATION_TOKEN esté disponible +require_once __DIR__ . '/config/config.php'; + // Ejecutar solo desde CLI o con token de protección básica en web if (php_sapi_name() !== 'cli') { - // En web: exigir token para evitar ejecuciones accidentales $token = $_GET['token'] ?? ''; if (empty($token) || $token !== (defined('MIGRATION_TOKEN') ? MIGRATION_TOKEN : '')) { http_response_code(403); @@ -19,8 +21,6 @@ if (php_sapi_name() !== 'cli') { } } -require_once __DIR__ . '/config/config.php'; - $sqlFile = __DIR__ . '/migrations/003_turnero.sql'; if (!file_exists($sqlFile)) {