feat(account): Profil-Felder, Instanz-Liste, Profil-Update + Passwort ändern
- 0002_account_profile.sql: company/contact_name/adresse/phone + instances.label - GET /account/me: alle Profilfelder + instances[] (Multi-Instanz vorbereitet), instance einzeln bleibt rückwärtskompatibel - PATCH /account/me: Profil aktualisieren (Whitelist) - POST /account/password: Passwort ändern (prüft aktuelles PW → 403 sonst) E2E verifiziert: Profil speichern, PW-Wechsel (falsch=403/richtig=200), instances[]=1 nach Checkout. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
-- RAPPORT-HOST — Konto-Profilfelder (für "Mein Konto" + QR-Rechnung später).
|
||||
-- Idempotent via IF NOT EXISTS, damit der Migrations-Runner mehrfach laufen kann.
|
||||
|
||||
alter table accounts add column if not exists company text;
|
||||
alter table accounts add column if not exists contact_name text;
|
||||
alter table accounts add column if not exists street text;
|
||||
alter table accounts add column if not exists zip text;
|
||||
alter table accounts add column if not exists city text;
|
||||
alter table accounts add column if not exists country text default 'CH';
|
||||
alter table accounts add column if not exists phone text;
|
||||
alter table accounts add column if not exists updated_at timestamptz not null default now();
|
||||
|
||||
-- Optionaler Anzeigename pro Instanz (Kunde benennt seine Instanzen selbst),
|
||||
-- damit eine Instanz-Liste im Konto lesbar ist (statt nur slug).
|
||||
alter table instances add column if not exists label text;
|
||||
Reference in New Issue
Block a user