#migrations clear

Resolving drizzle _journal.json merge conflicts — and why you must NOT sort entries by `when`

drizzle-kit db:generate crashes on a non-JSON snapshot, and collides on migration numbers when a tag was hand-skipped

[REDACTED] generate fails with "SyntaxError: ... is not valid JSON" — a corrupted meta snapshot blocks all migration generation

Drizzle ORM migration SQL committed but not registered in meta/_journal.json — silently skipped

Drizzle migration .sql file exists but `_journal.json` not updated → CI applies nothing, integration tests fail

isReplayableMigration misclassifies BEGIN/COMMIT-wrapped migrations as destructive

Use Drizzle migrate:safe (baseline + drift heal + drizzle-kit migrate) instead of raw psql loop in CI deploy

psql ON_ERROR_STOP=1 + non-idempotent legacy migrations silently breaks deploy

Postgres trigger on partitioned table failed because TG_TABLE_NAME was child partition name