Lehrling, and a field that stops being named after its values
worker_type had two values because the field was named after them: "Angestellte:r / Arbeiter:in". Lehrlinge are the third social-insurance category in Austria; until now they were filed as one of the other two, which they are not -- and which skewed every report grouped by this column by exactly those people. Adding the value is one line. The label was the work: the field was called after its two values in six places, and each of them becomes wrong with a third. They now read "Beschaeftigtengruppe", the name the import has used all along. One label deliberately keeps the old wording: app_feld_karte() in the database. That string is not a caption there but a key -- stored rows in employee_history and pending_changes carry it, and the map is how reverting or correcting a history entry finds the field again. Renaming it without rewriting those rows would make every older entry for this field unrevertable, and nobody would notice until they tried. The migration's assertion reads pg_enum rather than comparing against 'Lehrling'::worker_type: migrations run inside a transaction, and Postgres refuses to use a freshly added enum value in the transaction that added it. This has not been run against a live database here -- the CI migration job is the first real execution. Three hand-kept lists of the same enum (reports, import, the form) now have a test holding them to one another, each mutation-checked. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -302,7 +302,7 @@ eigenen Zeilen sind ohnehin immer dabei. Die Tabelle hiess bis September 2026
|
||||
| `employment_status` | Aktiv, Karenz, Geplant, Ausgetreten |
|
||||
| `employment_type` | Vollzeit, Teilzeit |
|
||||
| `contract_type` | unbefristet, befristet |
|
||||
| `worker_type` | Angestellte:r, Arbeiter:in |
|
||||
| `worker_type` | Angestellte:r, Arbeiter:in, Lehrling |
|
||||
| `collective_agreement` | Handel, Süßwaren |
|
||||
| `paygrade_type` | A, B, C, D, E, F |
|
||||
| `source_type` | Intern, Extern |
|
||||
|
||||
Reference in New Issue
Block a user