feat(persoenliche-ausruestung): show catalog category, remove size/date columns, make zustand admin-configurable

This commit is contained in:
Matthias Hochmeister
2026-04-16 08:19:38 +02:00
parent dac0b79b3b
commit 058ee721e8
14 changed files with 282 additions and 96 deletions

View File

@@ -0,0 +1,17 @@
-- Migration: 091_personal_equipment_configurable_zustand
-- Makes the zustand field on persoenliche_ausruestung admin-configurable
-- by removing the hard-coded CHECK constraint and seeding default options
-- into app_settings.
-- 1. Drop the hard-coded CHECK constraint
ALTER TABLE persoenliche_ausruestung DROP CONSTRAINT IF EXISTS persoenliche_ausruestung_zustand_check;
-- 2. Seed default zustand options into app_settings
INSERT INTO app_settings (key, value, updated_by, updated_at)
VALUES (
'personal_equipment_zustand_options',
'[{"key":"gut","label":"Gut","color":"success"},{"key":"beschaedigt","label":"Beschädigt","color":"warning"},{"key":"abgaengig","label":"Abgängig","color":"error"},{"key":"verloren","label":"Verloren","color":"default"}]',
'system',
NOW()
)
ON CONFLICT (key) DO NOTHING;