import { defineConfig } from 'drizzle-kit';
import { config } from 'dotenv';
import { resolve } from 'path';

// Load .env from project root (parent directory)
config({ path: resolve(__dirname, '../.env') });

export default defineConfig({
  out: './drizzle',
  schema: './src/modules/media/db/schema.ts',
  dialect: 'postgresql',
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
});
