16 lines
456 B
TypeScript
16 lines
456 B
TypeScript
import type { Config } from 'drizzle-kit'
|
|
import path from 'node:path'
|
|
import { env } from './src/lib/env-exporter'
|
|
|
|
// Default to the backend dev database in the monorepo.
|
|
const defaultDbPath = path.resolve(import.meta.dir, '../../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
|