20 lines
427 B
TypeScript
20 lines
427 B
TypeScript
import { defineConfig } from 'drizzle-kit';
|
|
import * as dotenv from 'dotenv';
|
|
|
|
if (process.env.NODE_ENV === "production") {
|
|
dotenv.config({ path: '.env.production' });
|
|
} else {
|
|
dotenv.config({ path: '.env.local' });
|
|
}
|
|
|
|
export default defineConfig({
|
|
dialect: 'postgresql',
|
|
schema: './src/db/schema.ts',
|
|
out: './drizzle',
|
|
dbCredentials: {
|
|
url: process.env.DATABASE_URL!,
|
|
},
|
|
verbose: true,
|
|
strict: true,
|
|
});
|