← Dev log
EduQate·data integrity

Schema and migrations drifting apart

schema.prisma and the applied migrations drifted apart silently; CI now diffs them on every run and fails the moment they disagree.

Two copies drifted

One idea kept by hand in two places — schema and migration, dev and prod, app and app.

schema.prisma and what was actually applied to the database stopped matching, either because I edited the schema without generating a migration or changed the DB directly and never reflected it back. It doesn't announce itself; it sits there until it causes a confusing failure somewhere unrelated. CI now diffs applied migrations against the schema on every run and fails immediately.