Commit graph

2 commits

Author SHA1 Message Date
16498a7650 fix: remove drizzle-kit push from auto-deploy to prevent data loss
BREAKING: drizzle-kit push with --force can delete columns that exist
in the database but not in the schema, causing data loss.

Changes:
- Remove automatic drizzle-kit push from deploy-production.sh
- Add warnings to sync-schema.sh about potential data loss
- Only use Payload migrations for safe schema changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 20:51:11 +00:00
9e433315e5 feat: add automatic schema sync to deployment workflow
- 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>
2025-12-27 20:17:47 +00:00