Skip to content
PtahDocs
v0.8.1

Testing and safety

Prove a schema change is correct and safe before it reaches a database, and turn that proof into a CI gate.

Every check here answers one question and no more than one. Knowing which question a green result answered is the difference between a gate and a habit.

A test asserts a change’s effect on a throwaway database. A lint finding is about the SQL as written, with no database involved. Validation is about the desired schema alone. None of them observes the database you are about to change, which is what drift detection is for.

So a green pull request means the change is correct in isolation. Whether the target is in the state the change assumes is a separate question, asked against that target.

Use a throwaway database for tests, a dev or shadow database for replay and planning, and a reviewed target URL for a real apply. These roles are not interchangeable, and database URLs and dev databases defines each one.

Exit codes is the automation contract, lint rules enumerates every rule identifier, and test cases is the exact case format.