From a3c734b0998de2d642cdb9ca44359b6b33e47e16 Mon Sep 17 00:00:00 2001 From: Gaurav Karakoti Date: Sun, 15 Nov 2026 23:17:38 +0530 Subject: [PATCH] Removing Shadow DB since it is auto managed --- .env.example | 2 -- CONTRIBUTING.md | 2 -- prisma.config.ts | 1 - prisma/README.md | 2 +- tests/prisma-drift-check.test.ts | 5 ++--- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.env.example b/.env.example index b4c4b512..2cd2fcf5 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,5 @@ DATABASE_URL="postgresql://neondb_owner:@ep-lingering-thunder-ate1tkym.c-9.us-east-1.aws.neon.tech/neondb?sslmode=verify-full&channel_binding=require" DATABASE_POOL_URL="postgresql://neondb_owner:@ep-lingering-thunder-ate1tkym-pooler.c-9.us-east-1.aws.neon.tech/neondb?sslmode=verify-full&channel_binding=require" -# Optional: Shadow database for local migration drift checks (npm run db:check-drift) -# SHADOW_DATABASE_URL="postgresql://user:password@localhost:5432/secureflow_shadow" DB_POOL_MAX=10 GROQ_API_KEY=gsk_your_actual_api_key_here GITHUB_APP_ID="your_app_id" diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d7aa4d6d..0d0e16e9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -207,8 +207,6 @@ npm run db:seed npm run db:check-drift ``` -> 💡 **Tip**: Running `npm run db:check-drift` locally requires `SHADOW_DATABASE_URL` configured in your environment to diff against a shadow database (e.g. `postgresql://user:password@localhost:5432/secureflow_shadow`). In CI, this is provided automatically. - ### 5. Run Development Server ```bash diff --git a/prisma.config.ts b/prisma.config.ts index 57c26c5d..f9e6fdb4 100644 --- a/prisma.config.ts +++ b/prisma.config.ts @@ -11,6 +11,5 @@ export default defineConfig({ }, datasource: { url: process.env["DATABASE_POOL_URL"], - shadowDatabaseUrl: process.env["SHADOW_DATABASE_URL"], }, }); diff --git a/prisma/README.md b/prisma/README.md index 572ffcee..924732fa 100644 --- a/prisma/README.md +++ b/prisma/README.md @@ -219,7 +219,7 @@ If your local database schema gets out of sync or encounters drift: ```bash npm run db:check-drift ``` - _Diffs migrations against `schema.prisma` using `prisma migrate diff --exit-code`. Exits with code 0 when in sync or code 2 when drift is detected. Requires `SHADOW_DATABASE_URL`._ + _Diffs migrations against `schema.prisma` using `prisma migrate diff --exit-code`. Exits with code 0 when in sync or code 2 when drift is detected. - **Check migration status**: ```bash npx prisma migrate status diff --git a/tests/prisma-drift-check.test.ts b/tests/prisma-drift-check.test.ts index fd44c0d3..01a8b24c 100644 --- a/tests/prisma-drift-check.test.ts +++ b/tests/prisma-drift-check.test.ts @@ -59,7 +59,6 @@ describe("Prisma Schema Drift Check (#1691)", () => { const contributingContent = fs.readFileSync(contributingPath, "utf8"); expect(contributingContent).toContain("npm run db:check-drift"); - expect(contributingContent).toContain("SHADOW_DATABASE_URL"); expect(contributingContent).toMatch(/- \[[ x]\] Run `npm run db:check-drift`/); }); @@ -107,7 +106,7 @@ describe("Prisma Schema Drift Check (#1691)", () => { expect(res.status).toBe(0); expect(res.stdout).toContain("No difference detected"); - }); + }, 30000); it("exits with 2 when diff detects unmigrated changes", () => { expect(fs.existsSync(schemaPath)).toBe(true); @@ -142,6 +141,6 @@ describe("Prisma Schema Drift Check (#1691)", () => { expect(res.status).toBe(2); expect(res.stdout).toContain("[+] Added"); - }); + }, 30000); }); });