Files
Epicure/packages/db/src/migrations/0007_majestic_retro_girl.sql
T
Arnaud add9365250 feat(db): Drizzle ORM schema and migrations
Schema domains: users/auth, recipes, social, meal-planning, tiers/usage, webhooks.
Includes Better Auth tables, audit_logs, site_settings, push_subscriptions,
user_model_prefs, user_nutrition_goals. Migrations 0000–0008 applied.
2026-07-01 08:08:44 +02:00

14 lines
557 B
SQL

CREATE TABLE "user_model_prefs" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"text_provider" text,
"text_model" text,
"vision_provider" text,
"vision_model" text,
"meal_plan_provider" text,
"meal_plan_model" text,
"updated_at" timestamp DEFAULT now() NOT NULL,
CONSTRAINT "user_model_prefs_user_id_unique" UNIQUE("user_id")
);
--> statement-breakpoint
ALTER TABLE "user_model_prefs" ADD CONSTRAINT "user_model_prefs_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;