version 0.8.0

This commit is contained in:
danny 2026-09-18 06:46:56 +02:00
parent f22007003a
commit e5ca9ef194
95 changed files with 5601 additions and 4042 deletions

23
bin/migrate.php Normal file
View file

@ -0,0 +1,23 @@
<?php
declare(strict_types=1);
/**
* CLI-Migrationsrunner (ersetzt den alten Web-Installer setup.php).
* Aufruf: php bin/migrate.php
*/
$base = dirname(__DIR__);
require $base . '/app/Database/migrations.php';
$cfg = require $base . '/config/config.php';
$dsn = sprintf('mysql:host=%s;dbname=%s;charset=%s', $cfg['host'], $cfg['dbname'], $cfg['charset']);
try {
$pdo = new PDO($dsn, $cfg['user'], $cfg['pass'], [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
]);
runMigrations($pdo, $cfg['dbname']);
fwrite(STDOUT, 'OK – Migrationen bis Version ' . LATEST_MIGRATION . " ausgeführt.\n");
} catch (Throwable $e) {
fwrite(STDERR, 'FEHLER: ' . $e->getMessage() . "\n");
exit(1);
}