Drizzle Studio Not Showing Tables that are in Supabase

I am starting to work on a project and using Drizzle and Supabase. I just did a drizzle-kit generate followed by a drizzle-kit migrate. When I look in supabase.com it shows that table. However, when I run drizzle-kit studio, I just get a spinner. This is what my drizzle.config.ts looks like
import { defineConfig } from 'drizzle-kit'
import { env } from '@/app/env'

export default defineConfig({
dialect: 'postgresql',
schema: './server/db/schema.ts',
out: './supabase/migrations',
dbCredentials: {
url: env.POSTGRES_URL,
},
})
import { defineConfig } from 'drizzle-kit'
import { env } from '@/app/env'

export default defineConfig({
dialect: 'postgresql',
schema: './server/db/schema.ts',
out: './supabase/migrations',
dbCredentials: {
url: env.POSTGRES_URL,
},
})
The POSTGRES_URL is from the Vercel & Supabase integration and uses the port 6543. However, if I use the POSTGRES_URL_NON_POOLING env var that ends in 5432, the studio will load. When looking into Supabase's Database Settings, it looks like the one ending in 6543 is for transaction mode and the one ending in 5432 is for session mode. Does this mean I need to use the non pooling URL for drizzle studio?
2 Replies
! dotarjun
! dotarjun4mo ago
have you tried installing pg dependency ?
jsingleton37
jsingleton374mo ago
Nope, I followed https://orm.drizzle.team/learn/tutorials/drizzle-with-supabase and it doesn’t suggest to have that installed… but why would having pg installed potentially fix drizzle studio not loading when using one URL vs the other?
Drizzle ORM - Drizzle with Supabase Database
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Want results from more Discord servers?
Add your server