18 lines
499 B
TypeScript
18 lines
499 B
TypeScript
import type { Config } from 'drizzle-kit'
|
|
import path from 'node:path'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { env } from './src/lib/env-exporter'
|
|
|
|
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
|
|
|
const defaultDbPath = path.resolve(__dirname, '../../apps/backend/dev.db')
|
|
const dbPath = env.SQLITE_PATH || defaultDbPath
|
|
|
|
export default {
|
|
schema: './src/schema/index.ts',
|
|
out: './drizzle',
|
|
dialect: 'sqlite',
|
|
dbCredentials: {
|
|
url: dbPath,
|
|
},
|
|
} satisfies Config
|