From a0db1b5b8c0bbd7e659153dcaea1d2ba373d191d Mon Sep 17 00:00:00 2001 From: Emmanuel Yusufu Kimaswa Date: Thu, 28 May 2026 12:59:50 +0300 Subject: [PATCH] fix(docs): correct drizzle import in Supabase and Xata get-started The first connection example on the Supabase and Xata get-started pages imported drizzle from "drizzle-orm", which doesn't export it (TS2305), and called drizzle('postgres-js', url), which isn't a valid signature. Both pages use the postgres-js driver, so import from "drizzle-orm/postgres-js" and pass the connection string directly, matching the node-postgres get-started page. Closes #3161 --- src/mdx/get-started/postgresql/ConnectSupabase.mdx | 4 ++-- src/mdx/get-started/postgresql/ConnectXata.mdx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mdx/get-started/postgresql/ConnectSupabase.mdx b/src/mdx/get-started/postgresql/ConnectSupabase.mdx index 66044d54b..c9d9203b9 100644 --- a/src/mdx/get-started/postgresql/ConnectSupabase.mdx +++ b/src/mdx/get-started/postgresql/ConnectSupabase.mdx @@ -3,10 +3,10 @@ import Callout from '@mdx/Callout.astro'; Create a `index.ts` file in the `src` directory and initialize the connection: ```typescript copy filename="index.ts" -import { drizzle } from 'drizzle-orm' +import { drizzle } from 'drizzle-orm/postgres-js' async function main() { - const db = drizzle('postgres-js', process.env.DATABASE_URL); + const db = drizzle(process.env.DATABASE_URL!); } main(); diff --git a/src/mdx/get-started/postgresql/ConnectXata.mdx b/src/mdx/get-started/postgresql/ConnectXata.mdx index b3f48d862..5bf587e5d 100644 --- a/src/mdx/get-started/postgresql/ConnectXata.mdx +++ b/src/mdx/get-started/postgresql/ConnectXata.mdx @@ -1,10 +1,10 @@ Create a `index.ts` file in the `src` directory and initialize the connection: ```typescript copy filename="index.ts" -import { drizzle } from 'drizzle-orm' +import { drizzle } from 'drizzle-orm/postgres-js' async function main() { - const db = drizzle('postgres-js', process.env.DATABASE_URL); + const db = drizzle(process.env.DATABASE_URL!); } main();