feat: compose + text-to-image generation modes (multi-image + free-text)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
This commit is contained in:
2026-07-23 19:19:39 +00:00
parent 6d58c6c8fd
commit 044eb7f1ae
7 changed files with 172 additions and 35 deletions
@@ -0,0 +1,35 @@
-- Klarbild — Erzeugungs-Modi, Vorschaubilder, Speicherverwaltung, NAS-Sicherung.
-- (04) Kombinieren aus mehreren Bildern + Freitext-Erzeugung, Thumbnails für die
-- Bibliothek, „nicht den Server vollmüllen" (Retention/Quellenlöschen), zweite
-- Datensicherung auf ein Synology-NAS.
-- Auftrags-Modus: each = jede Vorlage einzeln (bisher), compose = mehrere Bilder + Text
-- zu EINEM neuen Bild, generate = reiner Freitext ohne Vorlage.
ALTER TABLE jobs ADD COLUMN IF NOT EXISTS mode text NOT NULL DEFAULT 'each'
CHECK (mode IN ('each','compose','generate'));
-- Positionen: mehrere Quellbilder (compose) + verkleinertes Vorschaubild.
ALTER TABLE items ADD COLUMN IF NOT EXISTS source_paths jsonb;
ALTER TABLE items ADD COLUMN IF NOT EXISTS thumb_path text;
-- Rezepte können einen Modus vorbelegen (für Telegram-Standardrezepte).
ALTER TABLE recipes ADD COLUMN IF NOT EXISTS mode text NOT NULL DEFAULT 'each'
CHECK (mode IN ('each','compose','generate'));
-- Speicherverwaltung -------------------------------------------------------
ALTER TABLE settings ADD COLUMN IF NOT EXISTS keep_sources bool NOT NULL DEFAULT true;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS make_thumbnails bool NOT NULL DEFAULT true;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS retention_days int; -- NULL = unbegrenzt
-- Zweite Sicherung auf Synology-NAS (SFTP/FTPS, wie Picdrop) ----------------
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_enabled bool NOT NULL DEFAULT false;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_host text;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_protocol text CHECK (nas_protocol IN ('ftps','sftp'));
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_port int;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_user text;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_password_enc text;
ALTER TABLE settings ADD COLUMN IF NOT EXISTS nas_base_path text;
-- Spiegel-Status je Position (für Sichtbarkeit/Wiederholung).
ALTER TABLE items ADD COLUMN IF NOT EXISTS nas_status text NOT NULL DEFAULT 'none'
CHECK (nas_status IN ('none','pending','mirrored','failed'));
+5
View File
@@ -0,0 +1,5 @@
-- Telegram: Kombinieren/Erzeugen — Bildunterschrift als Beschreibung + Zwischenstatus.
ALTER TABLE telegram_drafts ADD COLUMN IF NOT EXISTS caption text;
ALTER TABLE telegram_drafts DROP CONSTRAINT IF EXISTS telegram_drafts_status_check;
ALTER TABLE telegram_drafts ADD CONSTRAINT telegram_drafts_status_check
CHECK (status IN ('collecting','awaiting_recipe','awaiting_compose_text','dispatched','discarded'));