Fachlich vorgegeben: nicht gendern, auch in den Exporten. Gespeichert
bleibt der Wert der Datenbank ("Angestellte:r", "Arbeiter:in",
"Praktikant:in", "Ehepartner:in", "Lebenspartner:in") - er steht in
Aufzaehlungstypen, Pruefbedingungen, der Historie und der Sicht fuer die
IT. Uebersetzt wird nur die Anzeige.
lib/ohne-gendern.ts: eine Regel ueber den Text (":innen", ":in", "e:r",
"e:n"), damit auch Texte aus der Datenbank wie "Angehoerige:r
hinzugefuegt" und Feldnamen der Historie ohne Gendern erscheinen.
Auswahllisten senden weiter den gespeicherten Wert.
Angewendet in Formularen, Historie, Protokoll, Berichten und Filtern,
Mitarbeiter- und Ereignisexport, Importvorlage; der Import nimmt beide
Schreibweisen an. Feste Texte (Menue, Liste, Notizen, Anmeldung)
direkt umformuliert.
Geprueft: lint, tsc, types:check, 885 Tests, Waechter
Vertrag: VL (1-8, freiwillig) und Bonusanspruch (Vorgabe Nein; bei Ja eine
Bonusregelung: RL ab 01.01.2027, RL bis 31.12.2026, Aussendienst, Shop)
direkt nach dem Hay-Grade -- im Einstellungsassistenten, im Wiedereintritt
und in "Daten aendern", sichtbar im Reiter Vertrag und im Datenexport.
Stammdaten: zustaendige HR. Auswaehlbar sind alle aktiven HR-Konten; die
Datenbank prueft das. Historie und Audit-Log zeigen den Namen.
Kollektivvertraege: Suessware Arbeiter, Suessware Angestellter, Handel.
collective_agreement wird wie der Hay-Grade eine Domain ueber text. Der
Bestand mit "Suesswaren" wird nach der Beschaeftigtengruppe aufgeteilt
(Angestellte -> Angestellter, Arbeiter:innen und Lehrlinge -> Arbeiter),
ebenso geplante Aenderungen und Entwuerfe.
Die Funktionen werden an einzeiligen Ankern der laufenden Definition
ergaenzt (Einstellung, Wiedereintritt, Daten aendern, Nachtlauf,
Feldkarte). app_feld_karte hatte mit 100 Argumenten die Grenze von
jsonb_build_object erreicht; die neuen Felder stehen in einem zweiten
Objekt.
Gegen eine frische Datenbank geprueft: alle Migrationen samt
Selbstpruefung, zweiter Lauf leer, db/tests/rauchtest.sql und der neue
db/tests/vertragsangaben.sql (9 Schritte) bestanden, Umstellung des
Suesswaren-Bestands nachgestellt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The database moved to a container of our own; the platform is gone.
This takes out what was left of it — and, where the leftovers were load
bearing, moves rather than deletes.
Moved, not deleted:
supabase/migrations/ -> db/migrations/ the schema's source of truth
supabase/build-org.ts -> scripts/build-org.ts
lib/supabase/types.ts -> lib/types.ts 52 import sites repointed
The bookkeeping needed care. It lived in `supabase_migrations.schema_migrations`,
and simply renaming the schema would have left the runner facing an empty
table: it would have called all 67 migrations pending and replayed them
against a database that is long since current. So the runner now creates
`migrationen.schema_migrations` and, once, copies the old rows across —
guarded so a second run does nothing and a fresh database skips it entirely.
Only then does migration 20260907100000 drop the old schema.
Deleted: the CLI config, the seed, the historical schema/function dumps
(nothing read them), scripts/umzug-von-supabase.sh (the move is done), and
both Supabase packages plus the CLI. Nothing in the application imported
them — the build now succeeds with no environment variables at all, which
is the proof.
Integration tests: six of them signed in through Supabase Auth and asserted
against the anon key and the service role. That model is gone, so the tests
were not portable — they are deleted. session-context and
employee-status-filter already ran on pg and are untouched; om-reporting is
ported to a direct connection because it guards a real risk (the reporting
line rule exists twice, once in SQL and once in TypeScript).
CI: the integration job started a Supabase stack. It now runs a postgres
service, applies deploy/db-init and every migration to an empty database —
that was the valuable part, and it still holds — then checks that a second
run is a no-op, which is what proves the bookkeeping works.
Docs: security-review.md audited a service-role key, a cookie adapter and
auth.users, none of which exist. Restating findings about removed components
would suggest today's system had been reviewed; it has not. It now records
what was removed and says a fresh review is due. data-model.md was already
marked obsolete and described the pre-OM schema; azure-migration.md was a
plan for a route not taken. Both deleted.
Verified: npm ci, typecheck, lint, 445 tests, build — all clean without the
packages. Integration tests skip cleanly with no database. Migration SQL and
the runner are reviewed but NOT executed: no Docker here, and the old
instance no longer resolves.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
HR reported it from testing: change someone's address and their history
shows "Geänderte Felder: Adresse, Ort" — the new address is on the
Stammdaten tab, the old one is nowhere. It was recorded, but only in the
audit log, which is a different page sorted by time and actor rather
than by person. So you had to already know what you were looking for to
find out whether an address had ever changed, let alone what it used to
be.
The field-by-field diff was being built anyway and written to the audit
log. employee_history now carries the same list, and the person's
history renders it as an expandable Feld / Vorher / Nachher table — the
same table the audit log uses, lifted into a shared component so the two
views don't drift into reading differently. It expands with <details>,
so the values are in the page: findable with Ctrl+F, present when
printed, no script involved.
The duplication with audit_log is deliberate. A person's history should
be readable on its own, including after the log is eventually thinned by
a retention rule.
Rows written before today stay without values. They could only be
reconstructed from the audit log, and the link is not reliable — no key,
only a timestamp and a person. Honestly empty beats plausibly wrong.
The migration was generated from the live function definition rather
than retyped, and the diff is four lines: two column lists, two value
lists. It carries a self-check that raises if either insert failed to
pick up the new column, and it was rehearsed inside a rolled-back
transaction against real data first — the probe confirmed the old street
name lands in the history row.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>