79502172

Date: 2025-03-11 21:29:15
Score: 2
Natty:
Report link

My defineConfig looks like this:

export default defineConfig({
    schema: './src/lib/server/db/schema.ts',

    dbCredentials: {
        url: process.env.DATABASE_URL
    },

    verbose: true,
    strict: true,
    dialect: 'postgresql'
});

You don't need to set all the connection details. They are included in the database url.

DATABASE_URL="postgres://user:password@host:port/db-name"

Supabase refers to this as the connection string: https://supabase.com/docs/guides/database/connecting-to-postgres#direct-connection

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
  • Unregistered user (0.5):
  • Low reputation (1):
Posted by: yffaffy