Skip to content
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

Add support for applying out of order changes #6

Open
jsanda opened this issue Apr 10, 2017 · 0 comments
Open

Add support for applying out of order changes #6

jsanda opened this issue Apr 10, 2017 · 0 comments

Comments

@jsanda
Copy link
Contributor

jsanda commented Apr 10, 2017

Cassalog applies schema updates in the order in which they are declared. As the changes are applied they are also recorded in the changelog table. Cassalog checks that the order of schema updates in the scripts matches the order in the changelog table. For example, let's say we have applied changes 1, 2, 3. Then we edit our scripts so that we have 1, 2, 2.1, 3. The next time Cassalog runs, it will throw an exception because it expects to find schema update 3 in the scripts, it instead finds 2.1. There are situations where it would be helpful to relax the ordering constraint. Consider the following example.

We have v1 of our app (already released) that has schema updates u1, u2, u3. Then we released version v2 with u3, u4, u5. v3 is the next version to be released and it adds u6 and u7. We need to make a change that will go into v3, and it also needs to be back ported to v1 and v2. Cassalog currently does not handle this situation, or at least not very well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant