From bb25361c97bcd333685bf0da0ec98dd8f6d81282 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 27 Dec 2025 16:43:00 +0000 Subject: [PATCH] Address code review feedback - Remove dotenv import attempt (not needed, DATABASE_URL set via env) - Remove @ts-ignore directive - Replace dangerous 'prisma migrate reset' with safer 'prisma migrate resolve' in rollback docs - Verified Prisma generation still works without dotenv import Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com> --- .github/workflows/gated-deployment.yml | 5 +++-- frontends/nextjs/prisma.config.ts | 8 -------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/gated-deployment.yml b/.github/workflows/gated-deployment.yml index 53f64f831..f40a17b1c 100644 --- a/.github/workflows/gated-deployment.yml +++ b/.github/workflows/gated-deployment.yml @@ -580,9 +580,10 @@ jobs: 1. **Re-run workflow** with previous stable commit SHA 2. **OR use manual rollback:** - - Revert database migrations: \`npx prisma migrate reset\` + - Rollback specific migration: \`npx prisma migrate resolve --rolled-back \` - Deploy previous Docker image/build - - Restore from pre-deployment backup + - Restore from pre-deployment backup if needed + - ⚠️ Avoid \`prisma migrate reset\` in production (causes data loss) 3. **Notify:** Update team and status page 4. **Document:** Create post-mortem issue diff --git a/frontends/nextjs/prisma.config.ts b/frontends/nextjs/prisma.config.ts index fb774c18d..7fc764084 100644 --- a/frontends/nextjs/prisma.config.ts +++ b/frontends/nextjs/prisma.config.ts @@ -4,14 +4,6 @@ * This file replaces the deprecated package.json#prisma configuration. * See: https://www.prisma.io/docs/orm/reference/prisma-config-reference */ -// Try to load dotenv, but don't fail if it's not available (e.g., in CI) -try { - // @ts-ignore - dotenv might not be available - await import('dotenv/config') -} catch { - // Dotenv not available or failed - that's okay, DATABASE_URL might be set directly -} - import { defineConfig } from '@prisma/config' export default defineConfig({