Skip to content

Commit

Permalink
add tests for scylladb. add scylladb to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mkorolyov committed Jun 25, 2023
1 parent 691bc77 commit 7a72550
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -29,6 +29,7 @@ Database drivers run migrations. [Add a new database?](database/driver.go)
* [Redshift](database/redshift)
* [Ql](database/ql)
* [Cassandra](database/cassandra)
* [ScyllaDB](database/cassandra)
* [SQLite](database/sqlite)
* [SQLite3](database/sqlite3) ([todo #165](https://github.com/mattes/migrate/issues/165))
* [SQLCipher](database/sqlcipher)
Expand Down
5 changes: 3 additions & 2 deletions database/cassandra/README.md
@@ -1,11 +1,12 @@
# Cassandra
# Cassandra / ScyllaDB

* Drop command will not work on Cassandra 2.X because it rely on
system_schema table which comes with 3.X
system_schema table which comes with 3.X. Works as expected for ScyllaDB.
* Other commands should work properly but are **not tested**
* The Cassandra driver (gocql) does not natively support executing multiple statements in a single query. To allow for multiple statements in a single migration, you can use the `x-multi-statement` param. There are two important caveats:
* This mode splits the migration text into separately-executed statements by a semi-colon `;`. Thus `x-multi-statement` cannot be used when a statement in the migration contains a string with a semi-colon.
* The queries are not executed in any sort of transaction/batch, meaning you are responsible for fixing partial migrations.
* For ScyllaDB no additional configuration required as it is a drop-in replacement for Cassandra.


## Usage
Expand Down
2 changes: 2 additions & 0 deletions database/cassandra/cassandra_test.go
Expand Up @@ -25,9 +25,11 @@ var (
// Although Cassandra 2.x is supported by the Apache Foundation,
// the migrate db driver only supports Cassandra 3.x since it uses
// the system_schema keyspace.
// last ScyllaDB version tested is 5.1.11
specs = []dktesting.ContainerSpec{
{ImageName: "cassandra:3.0", Options: opts},
{ImageName: "cassandra:3.11", Options: opts},
{ImageName: "scylladb/scylla:5.1.11", Options: opts},
}
)

Expand Down

0 comments on commit 7a72550

Please sign in to comment.