Hussam
Hussam
Explore posts from servers
PPrisma
Created by Hussam on 10/7/2024 in #help-and-questions
How can I fix the migration order (already applied in production)
While working in feature branches, it is difficult to maintain the order in which the migrations are applied. Let's say we delete a table in the migration and there's another migration that modifies the column of this table. The migration that deletes the table occurs first(created) but gets applied after the modification of the column takes places. While this works in production database, because edit column migration has already been applied at the time of applying deletio migration. But this would fail if someone would try from an empty database, even generating prisma clent won't be possible as we get a error similar to failed to apply cleanly to the shadow database.
2 replies