How to address migrations from different versions of dev branches? #614
Unanswered
amanangira
asked this question in
Q&A
Replies: 1 comment
-
Currently, In your example, if you don't have many migrations (or they don't take long to run), I'd start with a clean DB and run all migrations when switching branches. If that's not feasible, I'd find the migrations that need to be reverted and applied by running |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As far as I understand, this package holds only the current migration in the configured
migrations
table.Problem
dev_a
anddev_b
branched out from the latestmaster
.dev_a
anddev_b
.dev_a
switched todev_b
. Now, as soon as he runs the migrations he/she is given the errorError occurred running migrations: no migration found for version XXXXXXX: read down for version XXXXXXX : file does not exist
. Now in order to resolve it he/she has to do it manually figuring out the right version.How do I handle this scenario? Is there a better way around this problem that I am overlooking? I have previously worked with Symfony (PHP framework) that puts in all the versions in the configured
migrations
table that has been executed. And simply shows a warning for migrations that are not found in the codebase. We are thinking of implementing something similar in case there is no way around this problem using the provided configurations in this package.Beta Was this translation helpful? Give feedback.
All reactions