Open clawconduce opened 8 years ago
Would we have a .up.cql as well? That seems pretty straightforward, go for it.
My thinking was if the file ends in <name>.up.cql
or <name>.cql
look for <name>.down.cql
. So either .up.cql or just .cql would work for the initial migration.
I'll take a shot at it! Thanks for the quick feedback.
I wanted to let you know that I am using https://github.com/mattes/migrate which can handle cassandra migrations. It's not nearly as lightweight, but it does have rollback already.
Interesting it looks like they have 2 separate up and down files. I'll keep this in mind when I get a chance to work on this ticket. Thanks!
I like how light this tool is, and how clean the source is, but I do miss having rollbacks in a migration tool.
I think it would require 2 changes to get them though:
.down.cql
files.rollback --target 20160101-new-table
, which would run all the.down.cql
files after the provided migration. Basically undo all the migrations after the20160101-new-table
.How does this sound? I could write up a PR if it sounds good. Thanks, Charles