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',
      },
});
