mirror of
https://github.com/ceratic/MediaCollectorLibary.git
synced 2026-05-13 23:56:46 +02:00
...
This commit is contained in:
18
run_migrations.php
Normal file
18
run_migrations.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
try {
|
||||
echo "=== Running Database Migrations ===\n";
|
||||
|
||||
$config = require __DIR__ . '/config/database.php';
|
||||
\App\Database\Database::setConfig($config);
|
||||
|
||||
echo "Running migrations...\n";
|
||||
\App\Database\Database::migrate();
|
||||
echo "✓ Migrations completed successfully!\n";
|
||||
|
||||
} catch (Exception $e) {
|
||||
echo "Migration error: " . $e->getMessage() . "\n";
|
||||
echo "Stack trace:\n" . $e->getTraceAsString() . "\n";
|
||||
}
|
||||
Reference in New Issue
Block a user