Added support for Streamdeck Pedal and updated UI to better fit the Packed UI style

This commit is contained in:
2026-02-27 22:47:08 +01:00
committed by erik
parent 5a70f775f1
commit 93faae5cc8
1463 changed files with 306917 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<?php
/**
* Migration: Erstellt journal_deduction_categories Tabelle für customizable Abzüge
* Ausführen: php tools/migrate_deductions.php
*/
require_once __DIR__ . '/../src/config.php';
require_once __DIR__ . '/../src/db.php';
$pdo = get_db();
echo "Migration: journal_deduction_categories\n";
try {
// Prüfen ob Tabelle existiert
$stmt = $pdo->query("SELECT to_regclass('public.journal_deduction_categories')");
$exists = $stmt->fetchColumn();
if ($exists) {
echo "Tabelle journal_deduction_categories existiert bereits.\n";
} else {
// Tabelle erstellen
$pdo->exec("CREATE TABLE journal_deduction_categories (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
sort_order INTEGER DEFAULT 0,
is_active BOOLEAN DEFAULT TRUE,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
)");
echo "Tabelle journal_deduction_categories erstellt.\n";
// Standard-Abzüge einfügen
$pdo->exec("INSERT INTO journal_deduction_categories (name, sort_order, is_active) VALUES
('Skonto', 1, TRUE),
('Lotto', 2, TRUE)
");
echo "Standard-Abzüge (Skonto, Lotto) eingefügt.\n";
}
echo "Migration erfolgreich!\n";
} catch (PDOException $e) {
echo "Fehler: " . $e->getMessage() . "\n";
exit(1);
}