Prompt·Writes and ingestion·PG05

Map every place that writes to the database

Several jobs, functions, APIs or agents change the same data, or nobody is sure who owns it.

Markdown
Prompt
Map the actual write paths for the important tables in this application. Identify every script, job, API, function, trigger and agent that can create, update or delete their records. Show who owns each field, which paths overlap, and where two writers can disagree or overwrite each other. Recommend the simplest ownership model supported by the existing system.
What it returns
A map from each writer to its tables and columns, then to triggers, side effects and consumers, with the cases where writers overlap or conflict.
Skip it when
One code path writes each table.
Avoid
Treating every extra writer as wrong. Find the paths that actually conflict.
Changes
Changes nothing
Sessions
Look first, then fix in a new session
Tools
Repository and read-only database access.
Works on
Any PostgreSQL host: Supabase, Neon, RDS, Cloud SQL or self-hosted.

Related prompts

More in Writes and ingestion.