feat: add Drizzle ORM support and update README with environment setup and migration scripts
This commit is contained in:
17
Backend/drizzle.config.ts
Normal file
17
Backend/drizzle.config.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import 'dotenv/config';
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
|
||||
if (!process.env.DATABASE_URL) {
|
||||
throw new Error('DATABASE_URL is not set');
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
schema: './db/schema.ts',
|
||||
out: './drizzle',
|
||||
dialect: 'postgresql',
|
||||
dbCredentials: {
|
||||
url: process.env.DATABASE_URL,
|
||||
},
|
||||
strict: true,
|
||||
verbose: true,
|
||||
});
|
||||
Reference in New Issue
Block a user