Build log · 20 July 2026
The day we stopped letting deploys touch the schema blindly
Written up in November 2026 from our engineering log · 2 min read
For the first months, every deploy synchronised the database schema with a command whose name contains the warning: accept data loss. It worked, until we read it carefully.
What the old deploy did
The deploy ran `prisma db push --accept-data-loss` against production. It makes the database match the schema file, and when that means dropping a column, it drops it. A renamed field would have been treated as one field deleted and another created — with the data in the first one gone.
What replaced it
On 20 July we baselined the existing schema as a first migration and switched the deploy to `prisma migrate deploy`. Every schema change is now a reviewed SQL file in the repository, generated beforehand and applied as written. Nothing is inferred at deploy time.
Two rules came with it, and both are written down where the next person will read them: never run `db push` against production again, and never run a seed in the deploy's migration step, which has no build tools and once took a deploy down by trying.