Answer the question
In order to leave comments, you need to log in
How to make a conditional migration?
Hello! Can you please tell me how to make a conditional migration?
For example, there are two different environments of the same project, and once in one of the environments a field was added to the database "on the fly" in one of the tables (let's say price ). Now this field needs to be added to the migration, but how to make it so that it does not "fall" on another environment, such as adding a check to the migration, if the field is already in the specified table, then simply write down the migration that passed, and if not, then add the field to table?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question