spoder7651
DTDrizzle Team
•Created by spoder7651 on 6/9/2023 in #help
Drizzle migrations workflow with CICD and multi-dev teams
Hi! I'm looking into ORMs to use for my team in a new Node/TS project, and Drizzle has caught my attention.
tldr: Is it possible to use Drizzle in a CICD pipeline to apply migrations?
One thing that I don't have clarity on is how Drizzle would work in an environment where multiple devs are working on migrations concurrently.
With other ORMs I have used, I've setup our codebase such that devs are able to create and apply migrations in their local environment, commit the migrations, and merge into master. Then, a CICD pipeline applies the migration to the prod database. This ensures that there are no conflicting migrations (the migration will fail to build/run), and ensures safeguards against modifying the prod database without proper reviews.
A core aspect of this is that migration metadata is stored in the database, allowing the same set of migrations to be applied to different databases (local/staging/prod). However, with Drizzle, it looks like migration metadata is stored in the codebase, which makes me think it would be difficult to apply migrations in a CI environment (doing so would mean that CI pipelines need to be able to commit code to our repo, which sounds iffy).
Am I on the right track here? Has someone successfully setup a CI pipeline that applies Drizzle migrations?
6 replies