I am not able to run liquibase on Amazon Redshift. Getting the below error :
[2022-05-27 10:52:56] WARNING [liquibase.database] Unknown database: Redshift
[2022-05-27 10:53:02] SEVERE [liquibase.integration] ERROR: current transaction is aborted, commands ignored until end of transaction block
liquibase.exception.CommandExecutionException: liquibase.exception.LiquibaseException: Unexpected error running Liquibase: ERROR: current transaction is aborted, commands ignored until end of transaction block [Failed SQL: (0) CREATE TABLE liquibase.DATABASECHANGELOGLOCK (ID INT NOT NULL, LOCKED BOOLEAN NOT NULL, LOCKGRANTED datetime, LOCKEDBY VARCHAR(255), CONSTRAINT PK_DATABASECHANGELOGLOCK PRIMARY KEY (ID))]
Followed the below for jdbc and extension download :
Hi @amandeep Can you try using the latest version of the extension and Liquibase?
Looks like you are using the Liquibase 3.10.1 extension. Which I assume means you are using Liquibase 3.10.1 as well
If you are getting the “Unknown database: Redshift” error, that would indicate the extension doesn’t recognize what you are connecting to as Redshift. The code looks for “redshift” or port 5439 in the connection URL. Optionally, you could set the system property “liquibase.ext.redshift.force” to true. You can see the code on line 173 here liquibase-redshift/RedshiftDatabase.java at main · liquibase/liquibase-redshift · GitHub. Does that help?
Thank you for the reply. Do I need to have a custom build of the container to make this all work? I’m currently pointing my GitHub action to liquibase-github-actions/update@v4.20.0.
I have a successful connection but see the warning about Redshift not being found and then it appears it can’t create the change log or the lock file.
My guess is even though in my classpath I’m pointing to liquibase-redshift-4.20.0.jar it isn’t doing anything with that file.
I looked at adding liquibase.ext.redshift.force to one of the parameters in my GitHub action but don’t see that as an available option. I’m probably missing one simple instruction somewhere.