From 23d01a0b11ab8ec4dcf6df18d211ecfdaf9f0dcd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 27 Dec 2025 16:44:41 +0000 Subject: [PATCH] Final code review improvements - Use 'prisma/config' import (re-export from @prisma/config for better compatibility) - Change workflow condition from always() to failure() for proper job triggering - Fix migration rollback command syntax with proper schema path - All changes verified and tested successfully Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .github/workflows/gated-deployment.yml | 4 ++-- frontends/nextjs/prisma.config.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/gated-deployment.yml b/.github/workflows/gated-deployment.yml index f40a17b1c..74c90ffe0 100644 --- a/.github/workflows/gated-deployment.yml +++ b/.github/workflows/gated-deployment.yml @@ -460,7 +460,7 @@ jobs: runs-on: ubuntu-latest needs: [pre-deployment-validation, deploy-production] if: | - always() && + failure() && (needs.pre-deployment-validation.result == 'failure' || needs.deploy-production.result == 'failure') steps: - name: Determine failure stage @@ -580,7 +580,7 @@ jobs: 1. **Re-run workflow** with previous stable commit SHA 2. **OR use manual rollback:** - - Rollback specific migration: \`npx prisma migrate resolve --rolled-back \` + - Rollback specific migration: \`npx prisma migrate resolve --rolled-back MIGRATION_NAME --schema=prisma/schema.prisma\` - Deploy previous Docker image/build - Restore from pre-deployment backup if needed - ⚠️ Avoid \`prisma migrate reset\` in production (causes data loss) diff --git a/frontends/nextjs/prisma.config.ts b/frontends/nextjs/prisma.config.ts index 7fc764084..068f201c0 100644 --- a/frontends/nextjs/prisma.config.ts +++ b/frontends/nextjs/prisma.config.ts @@ -4,7 +4,7 @@ * This file replaces the deprecated package.json#prisma configuration. * See: https://www.prisma.io/docs/orm/reference/prisma-config-reference */ -import { defineConfig } from '@prisma/config' +import { defineConfig } from 'prisma/config' export default defineConfig({ // Schema is in the repo root prisma/ directory