Commit Graph

3 Commits

Author SHA1 Message Date
b1289831f3 Revert "fix(deployment): handle failed migrations automatically in docker-entrypoint"
This reverts commit 3c4e273e26.
2026-04-14 11:53:35 +08:00
3c4e273e26 fix(deployment): handle failed migrations automatically in docker-entrypoint
- Detect failed migrations in _prisma_migrations table
- Auto resolve with 'prisma migrate resolve --rolled-back'
- Fallback to 'prisma db push' if resolve fails
- Ensures staging/prod can deploy even with migration history issues

Fixes P3009 error on staging where 20260406032433_init migration failed

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:26:49 +08:00
e7c3c020c2 fix(deployment): add auto database migration on container startup
- Create docker-entrypoint.sh to run prisma migrate deploy before app start
- Update Dockerfile to use entrypoint script
- Ensures database schema is always up-to-date after deployment
- Fixes: CRUD kependudukan error 500 di staging karena tabel belum dibuat

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-04-14 11:03:11 +08:00