This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
import { env } from 'node:process';
|
||||
import dotenv from 'dotenv';
|
||||
dotenv.config({ path: ['.env.local', '.env'] });
|
||||
|
||||
const DATABASE_URL = process.env.POSTGRES_URL;
|
||||
if (!DATABASE_URL) {
|
||||
throw new Error('POSTGRES_URL environment variable is required');
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
schema: './lib/db/schema.ts',
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: {
|
||||
url: env.POSTGRES_URL!,
|
||||
url: DATABASE_URL,
|
||||
},
|
||||
out: './drizzle',
|
||||
});
|
||||
|
Reference in New Issue
Block a user