mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-17 19:44:12 +00:00
- Add drizzle.production.config.ts for schema synchronization - Add scripts/sync-schema.sh for manual schema sync - Update deploy-production.sh to run drizzle-kit push after migrations - Document schema sync workflow in DEPLOYMENT_STRATEGY.md - Update CLAUDE.md with schema sync commands This prevents schema drift between DEV and PROD by automatically syncing the database schema (especially payload_locked_documents_rels) during deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
20 lines
559 B
TypeScript
20 lines
559 B
TypeScript
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,
|
|
})
|