feat: add Drizzle ORM support and update README with environment setup and migration scripts

This commit is contained in:
2025-12-07 10:20:00 +00:00
parent 546573c694
commit 27d14ac112
8 changed files with 91 additions and 5 deletions

17
Backend/drizzle.config.ts Normal file
View 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,
});