16 lines
352 B
PHP
16 lines
352 B
PHP
<?php
|
|
require_once 'db/config.php';
|
|
|
|
try {
|
|
$pdo = db();
|
|
$file = 'db/migrations/002_create_users_table.sql';
|
|
$sql = file_get_contents($file);
|
|
$pdo->exec($sql);
|
|
echo "Successfully ran migration: $file\n";
|
|
|
|
echo "All migrations ran successfully.\n";
|
|
|
|
} catch (PDOException $e) {
|
|
die("Database error: " . $e->getMessage());
|
|
}
|
|
?>
|