-
Notifications
You must be signed in to change notification settings - Fork 162
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
No easy way to find previous state #348
base: master
Are you sure you want to change the base?
No easy way to find previous state #348
Conversation
dfb54f6
to
669a596
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea.
Is it possible to test if this gracefully falls back when a table does not have the from_state
column?
It'd be great if we didn't make table migrations required.
Could we have a
Basically, i'm trying to avoid adding the redundant column. If the concern here is the performance hit of an extra DB call, rather than the non-obvious code one needs to write to get the "next-to-last" transition, then this obviously doesn't help. |
@dmagliola The point of this PR is getting the previous state without another DB call. |
@danwakefield I'm afraid this would be a breaking change since I'm making that a required value when transitioning. What do you think about adding the We could do that as a "workaround" and push it in a minor change and make the |
What about initial state? |
Closes #263
Before:
After: