fix: resolve duplicate client_coordinates migration on deploy

This commit is contained in:
kevin-asprec
2026-05-06 04:33:47 +08:00
parent d2864961de
commit ade5df1c32

View File

@@ -34,4 +34,4 @@ COPY --from=builder /app/packages/db/src ./packages/db/src
ENV NODE_ENV=production ENV NODE_ENV=production
EXPOSE 3001 EXPOSE 3001
ENTRYPOINT ["dumb-init", "--"] ENTRYPOINT ["dumb-init", "--"]
CMD ["sh", "-c", "cd packages/db && npx prisma migrate resolve --applied 20260504100000_add_user_must_change_password 2>/dev/null; npx prisma migrate deploy && if [ \"$RUN_SEED\" = \"true\" ]; then echo 'Seeding database...' && npx tsx prisma/seed.ts; fi && cd /app && node dist/main"] CMD ["sh", "-c", "cd packages/db && npx prisma migrate resolve --applied 20260504100000_add_user_must_change_password 2>/dev/null; npx prisma migrate resolve --applied 20260506070000_add_client_coordinates 2>/dev/null; npx prisma migrate deploy && if [ \"$RUN_SEED\" = \"true\" ]; then echo 'Seeding database...' && npx tsx prisma/seed.ts; fi && cd /app && node dist/main"]