Commit Graph

3 Commits

Author SHA1 Message Date
Christian
92b888b78f Add migrations for seeding tags and enhancing todo steps
- Created migration 146 to seed case type tags with various categories and keywords.
- Created migration 147 to seed brand and type tags, including a comprehensive list of brands and case types.
- Added migration 148 to introduce a new column `is_next` in `sag_todo_steps` for persistent next-task selection.
- Implemented a new script `run_migrations.py` to facilitate running SQL migrations against the PostgreSQL database with options for dry runs and error handling.
2026-03-20 00:24:58 +01:00
Christian
776f7a52ad Fix: Tilføj manglende kolonner til tmodule_order_lines
CRITICAL BUG FIX:
- case_contact, time_date, is_travel manglede i tmodule_order_lines tabel
- Forårsagede SQL fejl ved order creation INSERT
- Opdateret migration 031 til at tilføje alle manglende kolonner
- Applied direkte på production DB

ERROR: column 'case_contact' does not exist
  → INSERT INTO tmodule_order_lines ... case_contact, time_date, is_travel
2025-12-23 00:33:28 +01:00
Christian
152670b4b2 Fix: Tilføj manglende is_travel og hourly_rate kolonner til tmodule_times
CRITICAL BUG FIX:
- Approval endpoint fejlede fordi is_travel kolonne ikke eksisterede i DB
- Koden referenced is_travel men migration var aldrig kørt
- Tilføjet is_travel (BOOLEAN DEFAULT false)
- Tilføjet hourly_rate (DECIMAL(10,2)) til times tabel
- Testet: Approval virker nu korrekt (entry 1225 godkendt)

RODSAG:
- User kunne ikke godkende timer fordi SQL fejlede med 'column does not exist'
- Dette forklarer hvorfor 0 entries nogensinde er blevet approved i systemet
2025-12-23 00:16:32 +01:00