This commit is contained in:
lizandrogd
2026-01-21 12:20:46 -05:00
parent 6cec747ae3
commit 901d51c82f
11 changed files with 363 additions and 7 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
require_once __DIR__ . '/../config/config.php';
$db = Database::getInstance();
$dir = __DIR__ . '/../migrations';
$files = glob($dir . '/*.sql');
foreach ($files as $f) {
echo "Running migration: " . basename($f) . "\n";
$sql = file_get_contents($f);
try {
$db->execute($sql);
echo "OK\n";
} catch (Exception $e) {
echo "Failed: " . $e->getMessage() . "\n";
}
}
echo "Migrations completed.\n";