4902ed3ced
Add soft-delete support for clients: disable is the default action (hiding from client list and booking flow), with permanent deletion requiring explicit type-to-confirm. Disabled clients remain in reporting and can be re-enabled by staff. - Add client_status enum (active/disabled) and disabled_at column - API defaults GET /api/clients to active-only, ?includeDisabled=true shows all - PATCH /api/clients/:id accepts status field for disable/enable - DELETE requires ?confirm=true query param - Booking flow skips disabled clients - Frontend: show disabled toggle, disable/enable buttons, delete confirmation modal Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7 lines
229 B
SQL
7 lines
229 B
SQL
-- Add client status (soft-delete support)
|
|
CREATE TYPE "client_status" AS ENUM ('active', 'disabled');
|
|
|
|
ALTER TABLE "clients"
|
|
ADD COLUMN "status" "client_status" NOT NULL DEFAULT 'active',
|
|
ADD COLUMN "disabled_at" timestamp;
|