Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
DATABASE_URL="postgresql://neondb_owner:<Password>@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:<Password>@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"
Expand Down
2 changes: 0 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion prisma.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,5 @@ export default defineConfig({
},
datasource: {
url: process.env["DATABASE_POOL_URL"],
shadowDatabaseUrl: process.env["SHADOW_DATABASE_URL"],
},
});
2 changes: 1 addition & 1 deletion prisma/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions tests/prisma-drift-check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`/);
});

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -142,6 +141,6 @@ describe("Prisma Schema Drift Check (#1691)", () => {

expect(res.status).toBe(2);
expect(res.stdout).toContain("[+] Added");
});
}, 30000);
});
});
Loading