Redgate Flyway

Cassandra Database - Native Connectors

Supported Versions and Support Levels

Driver

Item Details
URL format cassandra://host:port/keyspace?localdatacenter=datacenter1
Ships with Flyway Command-line Yes
Maven Central coordinates org.apache.cassandra:java-driver-core
Default port 9042

Using Flyway with Cassandra Native Connectors

Flyway's Native Connector support for Cassandra requires setting the environment variable FLYWAY_NATIVE_CONNECTORS=true.

Unlike the JDBC connector, the Native Connector communicates directly with Cassandra using the Java driver API rather than going through a JDBC wrapper. The legacy jdbc:cassandra:// prefix is also accepted but deprecated.

Good to know

CQL file extensions

Cassandra migrations typically have a .cql migration suffix, we recommend configuring flyway to pick these up using the sqlMigrationSuffixes Parameter.

You would specify this in your TOML configuration like this:

[flyway]
sqlMigrationSuffixes = [".cql"]

Default schema/keyspace

Flyway maps it's concept of schema onto a keyspace in Cassandra. If a keyspace is specified in the URL, it will be used as the default schema. You can also configure it explicitly using:

Limitations

  • You can't currently do a Dry-run on operations with Cassandra.
  • You can only specify a single host in the URL (specifying multiple hosts was a feature of the legacy ING JDBC driver), the driver and database take care of connecting to other hosts in the cluster. This does mean that if the host Flyway is connecting to is unavailable then you will need to update the url to point to an available host.

This documentation contains proprietary information and is protected by copyright law.
Copyright © 2026 Red Gate Software Limited. All rights reserved


Didn't find what you were looking for?