[ADR]: migrate ORM from Prisma to Drizzle #49
Labels
backend
Backend related
documentation
Improvements or additions to documentation
enhancement
New feature or request
good first issue
Good for newcomers
Problem Statement
Currently, we are using Prisma for an ORM. This issue explains how a migration to Drizzle will help us down the line. Bellow are comparisons of the two in order of importance, for our use case. Note that this may not be extensive, and comments bellow are encouraged.
Comparisons
Team.name
, which was only caught by a reviewer, although none were created in the schema. Another example is that renaming a column can get confounded with creating a new column, which clears the database. Drizzle allows renaming a column without this happening. Of course there are many more problems that can arise by letting the ORM fully decide what happens. To back up all of this, Drizzle currently has 800 issues, while Prisma has 3000 🤯. Different number of downloads, but the percentage of issues are currently much higher on Prisma's side. I would argue that Drizzle's "lack of magic" makes it clear what is going on behind the code.Solution Summary
Solution
To migrate to Drizzle, we would need to update the following:
Other options considered
Considered staying with Prisma, but for the above reasons and as it is still early for us, we are able to proceed with a migration.
The text was updated successfully, but these errors were encountered: