Files
shinkan-jinkendo/backend/migrations/097_platform_ai_settings.sql
T
LarsandCursor f49de9c971
Deploy Development / deploy (push) Successful in 1m0s
Test Suite / pytest-backend (push) Successful in 50s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 20s
Test Suite / k6 /health Baseline (push) Successful in 36s
Test Suite / playwright-tests (push) Failing after 7m52s
Let superadmins choose the OpenRouter model from the live catalog.
The platform default can be replaced in the admin UI when a model is no longer available, without editing OPENROUTER_MODEL.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-23 09:38:56 +01:00

19 lines
755 B
SQL

-- Migration 097: Plattform-Standard für das OpenRouter-Modell (Superadmin).
-- NULL = Umgebungsvariable OPENROUTER_MODEL.
-- Ein Prompt-Override in ai_prompts.openrouter_model hat weiter Vorrang.
CREATE TABLE IF NOT EXISTS platform_ai_settings (
id SMALLINT PRIMARY KEY DEFAULT 1,
CONSTRAINT platform_ai_settings_singleton CHECK (id = 1),
openrouter_model VARCHAR(200),
updated_at TIMESTAMP WITH TIME ZONE DEFAULT NOW(),
updated_by_profile_id INT REFERENCES profiles(id) ON DELETE SET NULL
);
INSERT INTO platform_ai_settings (id, openrouter_model)
VALUES (1, NULL)
ON CONFLICT (id) DO NOTHING;
COMMENT ON COLUMN platform_ai_settings.openrouter_model IS
'Plattform-Standard OpenRouter model id; NULL = OPENROUTER_MODEL aus der Umgebung';