import { defineConfig } from 'drizzle-kit';
import path from 'path';

const dataDir = process.env.DATA_DIR
  ? path.join(path.resolve(process.cwd(), process.env.DATA_DIR), 'data')
  : path.join(process.cwd(), 'data');

export default defineConfig({
  dialect: 'sqlite',
  schema: './src/lib/db/schema.ts',
  out: './drizzle',
  dbCredentials: {
    url: path.join(dataDir, 'db.sqlite'),
  },
});
