Spaces:
Sleeping
Sleeping
Download backend/migrations/006_global_model.sql from bardd/mike-backend: direct link, hf CLI and curl.
- Browser
- Download file 798 Bytes
-
https://huggingface.co/spaces/bardd/mike-backend/resolve/main/backend/migrations/006_global_model.sql
- Command line
-
hf download hf://spaces/bardd/mike-backend/backend/migrations/006_global_model.sql
-
curl -L -o 006_global_model.sql https://huggingface.co/spaces/bardd/mike-backend/resolve/main/backend/migrations/006_global_model.sql
798 Bytes
| -- Single global model field on user_profiles. | |
| -- Replaces per-feature model selection (tabular_model) with one authoritative model | |
| -- that drives assistant chat, tabular extraction, and title generation. | |
| ALTER TABLE public.user_profiles ADD COLUMN IF NOT EXISTS model text; | |
| -- Backfill existing rows to the current manifest default. Old tabular_model values | |
| -- (gemini-3.5-flash, gemini-3.1-pro, gemini-3-flash) are invalid after the manifest | |
| -- rename, so do not copy them; resolveModel() also self-corrects any invalid value | |
| -- at runtime. | |
| UPDATE public.user_profiles | |
| SET model = 'gemini-3-flash-agent-high' | |
| WHERE model IS NULL; | |
| ALTER TABLE public.user_profiles ALTER COLUMN model SET NOT NULL; | |
| ALTER TABLE public.user_profiles ALTER COLUMN model SET DEFAULT 'gemini-3-flash-agent-high'; | |