Files
Epicure/packages/db/src/migrations/0005_massive_spot.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

9 lines
396 B
SQL

CREATE TABLE "user_ai_keys" (
"id" text PRIMARY KEY NOT NULL,
"user_id" text NOT NULL,
"provider" text NOT NULL,
"encrypted_key" text NOT NULL,
"created_at" timestamp DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "user_ai_keys" ADD CONSTRAINT "user_ai_keys_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action;