e8b3fde652
POST /api/print/single (image at an exact size, dpi headers incl. a real-dpi warning), GET /api/print/single as a mm-to-px calculator, POST /api/print/sheet (multi-image sheet as PDF, limits on cells/copies/pages) and print_presets for reusable sheet setups.
15 lines
781 B
SQL
15 lines
781 B
SQL
-- Druckbogen-Vorlagen („Kita-Satz Felix", „8× Passbild") -------------------
|
||
CREATE TABLE IF NOT EXISTS print_presets (
|
||
id uuid PRIMARY KEY DEFAULT gen_random_uuid(),
|
||
name text NOT NULL,
|
||
created_by uuid REFERENCES users(id) ON DELETE SET NULL,
|
||
config jsonb NOT NULL,
|
||
created_at timestamptz NOT NULL DEFAULT now()
|
||
);
|
||
CREATE INDEX IF NOT EXISTS print_presets_name_idx ON print_presets(name);
|
||
|
||
-- Telegram: Zustand „wartet auf Druck-Auswahl" -----------------------------
|
||
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','awaiting_print','dispatched','discarded'));
|