findyourpilot/src/integrations/drizzle/index.tsx
Jrodenas bababbeabb chore: update dependencies and improve database schema handling
- Updated @supabase/ssr to version 0.8.0 and @supabase/supabase-js to version 2.86.0.
- Upgraded various @tanstack packages to their latest versions for improved functionality.
- Refactored database schema exports in schema.ts for consistency and clarity.
- Modified drizzle integration to utilize createServerOnlyFn for database connection.
- Enhanced server functions for drones and places to use updated validation schemas.
- Changed validation schemas to improve naming conventions and clarity.
- Adjusted TypeScript configuration to disable verbatim module syntax for better compatibility.
2025-11-27 15:50:46 +01:00

13 lines
408 B
TypeScript

import { createServerOnlyFn } from "@tanstack/react-start"
import { drizzle } from "drizzle-orm/postgres-js"
import postgres from "postgres"
export const db = createServerOnlyFn(() => {
const connectionString = process.env.DATABASE_URL ?? ""
const client = postgres(connectionString, { prepare: false })
// Disable prefetch as it is not supported for "Transaction" pool mode
return drizzle(client)
})