Skip to content

Align db contract with neon schema#43

Open
badjoke-lab wants to merge 1 commit intofix/db-places-contractfrom
codex/audit-db-contract-vs-code-assumptions
Open

Align db contract with neon schema#43
badjoke-lab wants to merge 1 commit intofix/db-places-contractfrom
codex/audit-db-contract-vs-code-assumptions

Conversation

@badjoke-lab
Copy link
Copy Markdown
Owner

Summary

  • add reusable db/data-source helpers and expose db-backed places endpoints that map neon columns to lat/lng
  • update MapShell to use the db API when NEXT_PUBLIC_DATA_SOURCE=db while keeping existing JSON mode intact
  • document the actual schema, contract diffs, and ETL/country-normalization decisions

Testing

  • not run (not requested)

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 23, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cryptopaymap Error Error Nov 23, 2025 4:56pm

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/lib/db.ts
@@ -0,0 +1,28 @@
import { Pool } from "pg";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Install pg before using Pool

src/lib/db.ts now imports Pool from pg, but the package manifest/pnpm lock contain no pg entry and node_modules/pg is absent. When the new DB-backed routes (/api/places or /api/db/places) run in db mode, the server will fail to start with Cannot find module 'pg' before any query executes. Add the dependency or the DB paths remain unusable.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant