patka / cassandra-migration

Schema migration library for Cassandra
MIT License
152 stars 47 forks source link

Upgrade to Cassandra driver 4 #47

Closed antonioparry closed 4 years ago

antonioparry commented 4 years ago

Hi,

As you may have notice, com.datastax.cassandra dependency it's no longer developed as it is migrated to com.datastax.oss. The Cassandra 4 driver comes with several changes (in comparison to the 3.x driver).

Most of the features are similar but some concepts are changed (new driver drops the intermediate Cluster concept in favor of a single CqlSession entry point).

In this case, it is not possible to execute the following, as the expected type is a Cluster

Database database = new Database(cluster, "nameOfMyKeyspace");

In future version, this may be updated, allowing to pass the new "CqlSession" Class.

PD: Great tool to manage migrations, thanks.

patka commented 4 years ago

Hi,

I was actually not aware of that since I, like many other people, am struggling to get work and kids managed during these times and in my day job I do not work with Cassandra anymore.

I will have a look at this and see how much work an update is. If it is just a change of package names I can rather quickly update the v4 version to make use of the newer dependencies. In case you did not notice there is a _v4 package version that uses the version 4 driver but only the version 4.0 that still has the old package names. I will get back to you.

I am glad that the tool helps you :)

patka commented 4 years ago

I checked the code. You should be able to use the v4 package of this library with the com.datastax.oss driver package. As the packages did not change in version 4.6 of the driver and the dependency to the driver is marked as provided you can use the latest version of the driver along with the v4 version of this library.

antonioparry commented 4 years ago

Sorry, you're right!! I did not see that there is a _v4 in maven. This version is 2.2.1_v4 and i was checking with 2.3.1_v4 (was giving me an error).

I've tried this version and it's working now!!!!

Thanks for the quick answer.