debug: add error display to migrate.php to see what fails

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 15:23:35 +02:00
parent e540ec0448
commit 2b8e053e52

View File

@@ -6,13 +6,24 @@
* Lukee kaikki data/*.json -tiedostot ja siirtää ne MySQL-tietokantaan.
*/
// Näytä kaikki virheet
ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);
require_once __DIR__ . '/db.php';
echo "=== Noxus Intra: JSON → MySQL migraatio ===\n\n";
// 1. Luo taulut
echo "1. Luodaan tietokantarakenne...\n";
initDatabase();
try {
initDatabase();
} catch (Throwable $e) {
echo "VIRHE taulujen luonnissa: " . $e->getMessage() . "\n";
echo "File: " . $e->getFile() . ":" . $e->getLine() . "\n";
exit(1);
}
echo " ✓ Taulut luotu\n\n";
$dataDir = __DIR__ . '/data';