first commit
This commit is contained in:
16
backend/drizzle.config.ts
Normal file
16
backend/drizzle.config.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { defineConfig } from 'drizzle-kit';
|
||||
|
||||
const dbType = process.env.DB_TYPE || 'sqlite';
|
||||
|
||||
export default defineConfig({
|
||||
schema: './src/db/schema.ts',
|
||||
out: './drizzle',
|
||||
dialect: dbType === 'postgres' ? 'postgresql' : 'sqlite',
|
||||
dbCredentials: dbType === 'postgres'
|
||||
? {
|
||||
url: process.env.DATABASE_URL || 'postgresql://localhost:5432/spanglish',
|
||||
}
|
||||
: {
|
||||
url: process.env.DATABASE_URL || './data/spanglish.db',
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user