weavejester / ragtime

Database-independent migration library
Eclipse Public License 1.0
612 stars 85 forks source link

Add migration strategy useful for continuous delivery #129

Closed dlebrero closed 6 years ago

dlebrero commented 6 years ago

Blue/green deployments is a common technique used in continuous delivery, which basically means that two versions of an application running at the same time against the same database.

The existing raise-error migration strategy is not adequate for this scenario as if the old version of the application is restarted, the old version will refuse to start as it will find the new (future) migrations applied and raise an error.

With this new "ignore-future" migration, the old version of the application will expect that some "future" migrations have already been applied and do not raise an error in this case.

weavejester commented 6 years ago

Thanks for the PR. Can you ensure the commit message follows "The seven rules of a great Git commit message", as laid out in the contributing guidelines.

Also, ensure the files have ending newlines.

dlebrero commented 6 years ago

Thanks a lot for reviewing!

Fixed the empty lines.

About the commit message, is the issue just the length of the lines or is there something else?

If you don't mind, I will fix the commit message when squashing the PR once you are happy with the code.

weavejester commented 6 years ago

Yes, it's just the line length.

weavejester commented 6 years ago

The code looks fine, so you can squash, update the commit message, and I'll merge it in.

dlebrero commented 6 years ago

Squashed and fixed the commit message.

Thanks again and let me know if something else needs to be changed.