calendar and vehicle booking rework

This commit is contained in:
Matthias Hochmeister
2026-03-25 15:44:11 +01:00
parent e49639e2a6
commit 74d978171c
12 changed files with 1413 additions and 1835 deletions

View File

@@ -0,0 +1,22 @@
-- =============================================================================
-- Migration 062: Buchungskategorien (Booking Categories)
-- Replaces the fahrzeug_buchung_art ENUM with a configurable categories table.
-- =============================================================================
CREATE TABLE IF NOT EXISTS buchungs_kategorien (
id SERIAL PRIMARY KEY,
bezeichnung VARCHAR(100) NOT NULL UNIQUE,
farbe VARCHAR(7) DEFAULT '#607D8B',
aktiv BOOLEAN DEFAULT TRUE,
sort_order INTEGER DEFAULT 0,
erstellt_am TIMESTAMP WITH TIME ZONE DEFAULT NOW()
);
INSERT INTO buchungs_kategorien (bezeichnung, farbe, sort_order) VALUES
('intern', '#1976D2', 1),
('extern', '#388E3C', 2),
('wartung', '#F57C00', 3),
('reservierung', '#7B1FA2', 4),
('lehrgang', '#D32F2F', 5),
('sonstiges', '#607D8B', 6)
ON CONFLICT (bezeichnung) DO NOTHING;