Files
evig/scripts/db/migrations/128_deliverable_files.sql
Mao NakamotoandClaude Opus 4.8 6e4db31c69 feat(presentations): real team photos on V3 (repair + support desk)
From PR-Fotos/Fotos-Feb26: a team member doing focused repair now sits beside
the 'grosses Team' slide (split layout — the team finally has a face), and the
Support-Desk photo (two people, the 'Support Desk' sign) replaces the generic
bench shot on the Beratung/Support slide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-13 21:26:55 +02:00

21 lines
980 B
SQL

-- Migration 126: Deliverable files (downloadable / viewable code)
--
-- A deliverable can list files the recipient may download or view as code.
-- Files are web-served from public/ (always deployed with the standalone build) —
-- each entry is { "name": <display>, "url": <public path> }. This is the SSOT
-- for "download the files / see the code" on the detail + share pages.
ALTER TABLE deliverables
ADD COLUMN IF NOT EXISTS files JSONB NOT NULL DEFAULT '[]'::jsonb;
COMMENT ON COLUMN deliverables.files IS 'Array of { name, url } — downloadable/viewable files served from public/.';
-- Backfill the Kivitendo deliverable with its served files (guarded/idempotent).
UPDATE deliverables
SET files = '[
{ "name": "mockup.html", "url": "/presentations/kivitendo-intake/index.html" },
{ "name": "kivitendo-intake.css", "url": "/presentations/kivitendo-intake/kivitendo-intake.css" }
]'::jsonb
WHERE url = '/presentations/kivitendo-intake'
AND files = '[]'::jsonb;