mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Resolve migrations
This commit is contained in:
@@ -37,7 +37,10 @@ WORKDIR /deploy
|
|||||||
RUN corepack enable && corepack prepare pnpm@11.1.1 --activate
|
RUN corepack enable && corepack prepare pnpm@11.1.1 --activate
|
||||||
ENV CI=true
|
ENV CI=true
|
||||||
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
|
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
|
FROM node:24.15.0-alpine AS runner
|
||||||
RUN apk add --no-cache libc6-compat
|
RUN apk add --no-cache libc6-compat
|
||||||
|
|||||||
9
apps/edr-passenger-api/scripts/resolve-migrations.sh
Normal file
9
apps/edr-passenger-api/scripts/resolve-migrations.sh
Normal 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"
|
||||||
Reference in New Issue
Block a user