mirror of
https://github.com/bitbaum/botsmann.git
synced 2026-12-04 22:19:13 +01:00
- Add @~/.claude/CLAUDE.md import for global engineering standards - Update Last Updated date to 2026-01-23 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
22 lines
748 B
SQL
22 lines
748 B
SQL
-- Migration: OpenAI to OpenRouter
|
|
-- Changes openai_api_key to openrouter_api_key and updates the preferred_model constraint
|
|
|
|
-- Step 1: Rename the column
|
|
ALTER TABLE user_settings
|
|
RENAME COLUMN openai_api_key TO openrouter_api_key;
|
|
|
|
-- Step 2: Update the CHECK constraint
|
|
-- First drop the existing constraint
|
|
ALTER TABLE user_settings
|
|
DROP CONSTRAINT IF EXISTS user_settings_preferred_model_check;
|
|
|
|
-- Add the new constraint with openrouter
|
|
ALTER TABLE user_settings
|
|
ADD CONSTRAINT user_settings_preferred_model_check
|
|
CHECK (preferred_model IN ('groq', 'openrouter', 'ollama'));
|
|
|
|
-- Step 3: Update any existing 'openai' values to 'openrouter'
|
|
UPDATE user_settings
|
|
SET preferred_model = 'openrouter'
|
|
WHERE preferred_model = 'openai';
|