import { defineConfig } from 'drizzle-kit'

/**
 * Drizzle config for production schema sync.
 * Used by deploy script to push schema changes directly to database.
 *
 * Usage:
 *   DATABASE_URI="postgresql://..." pnpm exec drizzle-kit push --config=drizzle.production.config.ts
 */
export default defineConfig({
  schema: './src/payload-generated-schema.ts',
  out: './drizzle',
  dialect: 'postgresql',
  dbCredentials: {
    url: process.env.DATABASE_URI || '',
  },
  // Safe mode - will prompt for destructive changes
  strict: true,
  verbose: true,
})
