cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Haddad <...@jonhaddad.com>
Subject Re: Schema Versioning
Date Wed, 10 Feb 2016 20:22:01 GMT
I wrote most of the cqlengine keyspace & table management pieces of the
Python driver to solve this exact problem.  Instead of working with a
series of statements for creating tables & managing columns, we simply
created classes in Python and sync'ed them to the DB.  It automatically
figured out what was needed and took care of it.

DB Models:
https://datastax.github.io/python-driver/api/cassandra/cqlengine/models.html
Syncing to DB:
https://datastax.github.io/python-driver/api/cassandra/cqlengine/management.html#cassandra.cqlengine.management.sync_table

If you're not using Python, I'm not sure what options you have, I'm not
much help there.

On Wed, Feb 10, 2016 at 12:05 PM Joe Bako <jbako@gracenote.com> wrote:

> Hi all,
>
> I am curious what techniques are used by others to manage schema changes
> over time in Cassandra.
>
> Modern RDBMS tools can compare schemas between DDL object definitions and
> live databases and generate change scripts accordingly.  Older techniques
> included maintaining a version and script table in the database, storing
> schema change scripts in a sequential fashion on disk, and iterating over
> them to apply them against the target database based on whether they had
> been run previously or not (indicated in the script table).
>
> The former allows you to easily see schema changes over time in your SCM
> history, the latter keeps a history of actual DDL applied against the
> database objects.  What options are available for C* and what are people
> using?
>
> Joe Bako
> Software Architect
> Gracenote, Inc.
> http://www.gracenote.com/
>
>

Mime
View raw message