calendar and vehicle booking rework
This commit is contained in:
22
backend/src/database/migrations/062_buchungs_kategorien.sql
Normal file
22
backend/src/database/migrations/062_buchungs_kategorien.sql
Normal 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;
|
||||
Reference in New Issue
Block a user