3a061aa612
- format.ts parses free formats from the key: sticker<N> -> N×N cm, <W>x<H> -> W×H cm. Fixes 'Unbekanntes Format: sticker5' (the seeded 'Sticker 5 cm' recipe was unusable) and lets admins define ANY format without a migration. Guarded to <=300 cm. - Output file format PNG/JPG: global default (settings.output_ext) plus per-recipe/per-conversion override. JPG only for non-alpha; cutouts stay PNG. file.ts sniffs content-type from magic bytes. - Jobs can now be 'failed' (all items failed) -> red in the queue; add finished time to queue list + detail. migration 012. - Studio: custom-measure input + Dateiformat selector; Admin: global Standard-Dateiformat. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XNQ8ghPfzAfsyVYd6HgFb6
12 lines
703 B
SQL
12 lines
703 B
SQL
-- Aufträge dürfen jetzt auch „failed" sein (alle Positionen fehlgeschlagen) → rot in der Übersicht.
|
|
ALTER TABLE jobs DROP CONSTRAINT IF EXISTS jobs_status_check;
|
|
ALTER TABLE jobs ADD CONSTRAINT jobs_status_check
|
|
CHECK (status IN ('queued','running','paused','done','cancelled','failed'));
|
|
|
|
-- Ausgabeformat der Bilddatei: global (settings) + optionaler Rezept-Override.
|
|
-- „png" = verlustfrei (Standard, nötig für Transparenz), „jpg" = klein/Picdrop-freundlich.
|
|
ALTER TABLE settings ADD COLUMN IF NOT EXISTS output_ext text NOT NULL DEFAULT 'png'
|
|
CHECK (output_ext IN ('png','jpg'));
|
|
ALTER TABLE recipes ADD COLUMN IF NOT EXISTS output_ext text
|
|
CHECK (output_ext IN ('png','jpg'));
|