Answer the question
In order to leave comments, you need to log in
VCS and Yii2 migrations, how to rollback?
I'm interested in the situation when you return to previous commits and want to bring the database into line with the state of the code that is in this commit. So far, I see only the option to delete all migrations from the table in the database and then do yii migrate (that is, apply all migrations from scratch). The option has a drawback: with a large number of migrations, and if they also include initial data, there will be a long execution time.
Who decides such questions?
Answer the question
In order to leave comments, you need to log in
1. We roll back the migration to the one we need using migrate / to
2. We roll back to the required version of the sources
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question