Resolve migrations

This commit is contained in:
Stephanos A
2026-06-29 23:45:59 +03:00
parent c52b02ef72
commit f069ee985d
2 changed files with 13 additions and 1 deletions

View File

@@ -37,7 +37,10 @@ WORKDIR /deploy
RUN corepack enable && corepack prepare pnpm@11.1.1 --activate
ENV CI=true
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
CMD ["sh", "-c", "npm run prisma:generate && npm run prisma:migrate && npm run prisma:seed"]
# Copy the resolution script
COPY apps/edr-passenger-api/scripts/resolve-migrations.sh /deploy/scripts/
RUN chmod +x /deploy/scripts/resolve-migrations.sh
CMD ["sh", "-c", "/deploy/scripts/resolve-migrations.sh && npm run prisma:generate && npm run prisma:migrate && npm run prisma:seed"]
FROM node:24.15.0-alpine AS runner
RUN apk add --no-cache libc6-compat

View File

@@ -0,0 +1,9 @@
#!/bin/sh
set -e
echo "🔍 Checking for failed migrations..."
# Mark the specific failed migration as applied
npx prisma migrate resolve --applied "20240101000000_individual_tickets_no_timezone" || true
echo "✅ Migration resolution complete"