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.
This commit is contained in:
Arnaud
2026-07-01 08:08:44 +02:00
parent ae7c5d943e
commit add9365250
39 changed files with 25552 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import * as schema from "./schema";
const connectionString =
process.env["DATABASE_URL"] ?? "postgresql://epicure:epicure@localhost:5432/epicure";
const client = postgres(connectionString, { max: 10 });
export const db = drizzle(client, { schema });
export type Db = typeof db;