Files
sorsfonalak/crates/db/migrations/0017_model_settings.sql
T

9 lines
454 B
SQL
Raw Normal View History

-- The model writing each kind of analysis, chosen on the admin page. Without
-- a row the backend's default (ANALYSIS_MODEL, SUMMARY_MODEL) is used.
CREATE TABLE model_settings (
kind text PRIMARY KEY CHECK (kind IN ('summary', 'natal', 'synastry', 'forecast')),
model text NOT NULL CHECK (length(model) BETWEEN 3 AND 200),
updated_by uuid REFERENCES users ON DELETE SET NULL,
updated_at timestamptz NOT NULL DEFAULT now()
);