fix 13
This commit is contained in:
parent
b95f5763dd
commit
1fa3995736
16
run-migrations.php
Normal file
16
run-migrations.php
Normal file
@ -0,0 +1,16 @@
|
||||
<?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());
|
||||
}
|
||||
?>
|
||||
Loading…
x
Reference in New Issue
Block a user