Replies: 2 comments 1 reply
-
I don't think your question have a right answer. There might be recommended ways, but I don't think it's correct or anything. I don't really like push, I feel like I'm not in control, it just runs. With migrations, I can see the migration file and make sure is correct. |
Beta Was this translation helpful? Give feedback.
-
It is surprising that there isn't a way to mark migrations as already complete. This feature exists in mikro-orm. Looking at the migrations table, this is the structure:
I might try to manually create a new row and see how it handles |
Beta Was this translation helpful? Give feedback.
-
I'm a little bit in doubt what the intended flow of development is.
I have a local dev database, as i'm working on a new feature i'll modify my schema. I can then push the schema to my database using
push
, and test my queries.Once i'm certain about my changes, i then want to generate the migration file, but now I can't apply that migration to my local instance because the changes have already been applied, so the migration might fail.
So how do i get out of this situation? What I want to do is mark that the migration has already happened so its ignored, but so future migration files do get applied.
My only solution is to either hack the migration file so its empty when I apply, or nuke my db.
Beta Was this translation helpful? Give feedback.
All reactions