Checking whether devs forgot to generate migrations

Hey there! I'm looking to create a CI test, checking whether the developer has forgotten to generate migrations (it happens sometimes that someone pushes commits updating the drizzle schemas, but they forget to generate the corresponding migrations). My current approach is to run a drizzle-kit generate from the CI, and see whether some files were generated in the migration folder. It works in most cases, but if the migration generation asks some questions (e.g column renamed), my CI job just skips generating migrations. As a result it considers that no migration was forgotten, which is wrong. I'm wondering whether there are better approaches I can take? Maybe some Drizzle API allows checking for migrations, without requiring interaction? Thanks for the great lib, and for any help you can provide!
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?