# Lightweight PostgreSQL migration PR guardrails

> Project brief for Claude Code from NixInc Ideas: https://nixinc.co/ideas/2026-09-26-lightweight-postgresql-migration-pr-guardrails
> Scored 6.7/10 on 26 Sept 2026, verdict WATCH. Prices are as of the dates shown.

## What we're building
Small SaaS teams ship Postgres migrations generated by their ORM or written by hand, and a migration that locks or rewrites a table can pass code review unnoticed.

## Who pays
CTO or platform lead at a 5–50 engineer SaaS company shipping PostgreSQL migrations from Prisma, Drizzle, Rails, Django or raw SQL.

## What they already pay
- Bytebase, Pro (per user): $20/mo (as of 26 Sept 2026)
- Atlas, Per user: $9/mo (as of 26 Sept 2026)
- Atlas, CI pipelines (per project): $59/mo (as of 26 Sept 2026)

## Milestone 0: the 72-hour test, before any code
Produce three sample PR reviews and send 40 targeted messages.

- Pass line: Success requires at least 5 buyer calls, 3 repository-install commitments, and 1 signed paid LOI at the public Atlas $59/project/month benchmark.
- Stop rule: Kill: fewer than 3 install commitments or zero paid LOIs after 40 qualified contacts.

Do not start milestone 1 until the pass line is met.

## Milestone 1: the smallest version worth shipping
Three sample pull-request reviews done by hand on real migration PRs: name the lock or rewrite hazard, give the exact safer SQL, note how a team would suppress the rule, and attach an audit receipt. Send them in 40 targeted messages asking for install commitments and a paid letter of intent.

## Skip in v1
A migration engine, any database connection or credentials, schema management, and anything Atlas or Bytebase already do.

## Needs
Public repos with recent migration PRs, Postgres locking and rewrite rules mapped to each ORM's output, a GitHub app listing once a buyer pays, and direct outreach to CTOs and platform leads.

## How to work in this repo
1. Plan before you edit: say which files change, the smallest change that works and how you will check it, then wait for a yes.
2. One task at a time, small enough to read in one diff.
3. After each change, run the checks, then say what changed, what you tested and what still needs a person to look at.
4. Check it like a first-time customer: run the real thing and try the empty, error and success paths.
5. Keep secrets out of the repo and out of chat. Environment files stay local.
6. Ask before installing dependencies, touching payments or sign-in, or deleting files.
7. Do not build anything listed under "Skip in v1".
