-
Notifications
You must be signed in to change notification settings - Fork 523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hybrid versioning broken? #172
Comments
cc @1vn |
I think it's necessary to have the data schema match the branch migration, which is why we expect engineers to want to down migrate on branch changes. However, I also don't see why we can't add an option to let you explicitly only use sequential versioning to opt out of this mantra. @VojtechVitek thoughts? |
@1vn didn't we discuss the "strict mode" by default, from which you could opt-out? That could work. |
I'm coming at this with a very similar perspective as @sjernigan. I would very much prefer just to apply Bill's migration and call it a day. I'm sure there are some environments where this scenario fails, but that has worked well for my teams in Rails environments for years. Is there a form of a PR that I can submit to allow that functionality? Even it amounts to an extra option that we have to pass to say "run missing gaps in migrations" as to not change existing defaults so it doesn't step on the toes of your current process? Running
|
@sjernigan @zmoazeni I've been using this fork with --include-missing flag and it solves this exact problem. See #183 |
Out of order migrations have been added in #280
Thanks for all the feedback. |
I understand the theoretical need for the sequential ordering of migrations in prod (though I've never had the problem with my small dev team). I'm definitely aware of merge conflicts in development and the need for timestamp-based versioning. I can even imagine a process where the 'fix' command could bridge these two worlds. However, I don't see how goose's timestamped versioning works to solves merge conflicts in development. Here's the scenario that is seriously broken in out workflow.
1 Bill creates a migration on 4/1
2 Susan creates a migration on 4/2 and commits it master
3 Jill picks up Susan's migration and runs it
4. Bill merges his branch into master
5. Jill rebases or starts a new branch
5.
goose up
for Jill does not run Bill's migration or fail because it's only looking for migrations numerically greater than Susan'sI think the previously given answer is I have to down migrate to 3/X then migrate up. In my opinion, that puts a lot of burden on each developer. In my world, 99.99% of the time I would prefer it to just apply Bill's migration. I could potentially see a flag for the other .01% so it just fails. However, I'm struggling to see a scenario that it should just quietly complete the up migration and do nothing.
Before we get any farther, let me say that I understand this is your project and it's reasonable for you to have implemented inline with your process. AND, I appreciate your ongoing effort and time in making something public. But my real question is, "Is there any appetite to make goose work for environments like mine?"
The text was updated successfully, but these errors were encountered: