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:
13
migrate.php
13
migrate.php
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user