I have set the DATABASE_URL to the local connection string (postgres://postgres:postgres@db.localtest.me:5432/main?sslmode=require) and this is my drizzle.config.ts:
import { config } from 'dotenv';import { defineConfig } from 'drizzle-kit';config({ path: '.env.local' });if (!process.env.DATABASE_URL) { throw new Error('DATABASE_URL not found');}export default defineConfig({ schema: './src/db/schemas/*', out: './migrations', dialect: 'postgresql', dbCredentials: { url: process.env.DATABASE_URL, }, strict: true, verbose: true,});
import { config } from 'dotenv';import { defineConfig } from 'drizzle-kit';config({ path: '.env.local' });if (!process.env.DATABASE_URL) { throw new Error('DATABASE_URL not found');}export default defineConfig({ schema: './src/db/schemas/*', out: './migrations', dialect: 'postgresql', dbCredentials: { url: process.env.DATABASE_URL, }, strict: true, verbose: true,});