34681-vm/db/migrate_003_004.php
Flatlogic Bot 373e36aedb 0.1
2025-10-05 01:54:26 +00:00

21 lines
548 B
PHP

<?php
require_once __DIR__ . '/config.php';
function run_migration($file) {
$pdo = db();
$sql = file_get_contents($file);
if ($sql === false) {
die("Error reading migration file: $file");
}
try {
$pdo->exec($sql);
echo "Successfully executed migration: $file\n";
} catch (PDOException $e) {
die("Migration failed: " . $e->getMessage() . "\n");
}
}
run_migration(__DIR__ . '/migrations/003_create_skills_table.sql');
run_migration(__DIR__ . '/migrations/004_insert_sample_skills.sql');