- 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>
- 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>