Open crony1 opened 8 years ago
@crony1 Did you resolve this?
Hi,
I am facing the same issue with liquibase 3.5.1.
With liquibase 3.3.2 I can see the following :
Error setting up or running Liquibase: java.sql.SQLException: [Amazon](500310) Invalid operation: syntax error at or near "TAG";
@haavardeide I never did resolve this unfortunately.
I just ran across this by chance while searching for a related Redshift error.
The current_schema error can be resolved by changing select current_schema
to select current_schema()
. Redshift thinks it is a column name otherwise.
we faced the same issue: "Amazon Invalid operation: column "current_schema" does not exist;" Any updates?
Hi You can have a look at my fork : https://github.com/ValentinOzanne/liquibase-redshift
I committed a workaround to use "public" schema instead of launching an unsupported query. I quickly tried to use "select current_schema()" request but it didn't work and I didn't work again on this issue.
Hope it helps
@ValentinOzanne That fork did the trick for me! Thanks!
Please merge your fix back into the main project so we can eventually get this version from the maven-repo.
Btw, the Error setting up or running Liquibase: java.sql.SQLException: Amazon Invalid operation: syntax error at or near "TAG";
is caused during the creation of databasechangelog. This is because you use a mysql script for redshift. Tag is not a reserved word in mysql, but it is a reserved word in Redshift
Did anyone work around the TAG
issue @Engineer1111 highlighted? Does that mean liquibase isn't usable for Redshift at the moment?
I am trying to use Liquibase for redshift migration and ran into the same issue @Engineer1111 highlighted. Please help on the workaround. Can I go ahead and use it for redshift?
Using 1.0-SNAPSHOT it is working
@nvoxland, Could you please deploy/publish artifacts version 1.1, containing latest changes?
Thanks a lot!
I've built latest 1.1-SNAPSHOT and put into local repo, but the issue with TAG
isn't fixed yet.
As well weird things may happened after few restarts all tables are recreated. WHY?
Created PR for TAG issue. As a workaround you can create your own RedshiftDatabase class:
package liquibase.ext.redshiftfix.database; // Class has to be located in this package
import liquibase.ext.redshift.database.RedshiftDatabase;
public class RedshiftDatabaseFix extends RedshiftDatabase {
private static final int HIGH_PRIORITY = 5;
@Override
public int getPriority() {
return HIGH_PRIORITY;
}
@Override
public String getShortName() {
return "redshiftFix";
}
@Override
protected String getDefaultDatabaseProductName() {
return "RedshiftFix";
}
}
Can we have this resolved please?
The plugin is issuing 'select current_user' to Redshift and erroring with the following:
Unexpected error running Liquibase: Error executing SQL select current_schema: [Amazon](500310) Invalid operation: column "current_schema" does not exist;
Issuing the command directly to Redshift returns the same error. I believe the correct statement should be 'select current_schema()' according to Amazon documentationEDIT: I should add that I was using the JDBC driver provided by Amazon.
┆Issue is synchronized with this Jira Bug by Unito