Closed maximevw closed 2 days ago
@pasarbia are you able to help test us this PR?
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
hello, I will test it today. Thank you!
I have created a build from your branch fix/issue-297 @maximevw For some reasons, I got the initial error "countRows is not yet supported." I attached the log. issue-297.txt
@pasarbia Yes, I think I know why. Indeed, you have to add the property liquibase.cassandra.awsKeyspacesCompatibilityModeEnabled
with the value true
in your Liquibase configuration file to activate the specific behaviour for AWS Keyspaces, otherwise it keeps the default behaviour (not working with AWS).
Good news! I've managed to run status and update commands without errors. Thank you!
Thanks @maximevw for the fix and @pasarbia for testing it!
This PR aims to solve #297 (and also #128).
As discussed in the mentioned issue, it introduces a new property
liquibase.cassandra.awsKeyspacesCompatibilityModeEnabled
in theliquibase.properties
file. Defining it totrue
means we are running against an AWS Keyspaces instance and need to use some alternative implementations to bypass the unimplemented CQL features in Keyspaces.The different workarounds are:
LockServiceCassandra
, it almost keeps the implementation done in #292TagDatabaseGeneratorCassandra
, it introduces a query to get all the timestamps of the different changesets and determine the most recent one using pure Java (alternative to missing aggregate functionMAX()
).InitializeDatabaseChangeLogLockTableGeneratorCassandra
, it replaces the truncation of changelog lock table by aDROP TABLE
then aCREATE TABLE
DeleteGeneratorCassandra
, it replaces the truncation of the specified table byDELETE
queries for each row of the table, based on their primary key. It's not optimal but as theDeleteGenerator
is generic, we cannot easily re-create the truncated table.I took advantage of these changes to fix some minor problems in README file, Javadoc and to improve some formatting.