-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade regression - Liquibase fails to convert BOOLEAN to SMALLINT on existing database #40
Comments
Hello, The reason for this is probably that older HANA versions did not support a BOOLEAN db type. So either a type conversion/migration is required for the corresponding columns or you have to implement a custom data type as explained above. Best regards, |
Hello @P1ll3P4ll3, I am running into the same problem. Is it possible to place here your implementation or give a bit more detailed explanation on that? Best Regards. |
Hello All, I am running into the same problem now. Any suggestions here would be highly appreciated. Thanks. |
Solution that worked for me: When I encountered this situation, I dropped the 'Databasechangeloglock' table and restarted Liquibase processes again from start - that recreated the 'Databasechangeloglock' table - this time with compatible column datatype (Boolean). Reference -- liquibase/liquibase#1780 (comment) |
@P1ll3P4ll3 thanks for your suggestion, this worked us. BooleanTypeHana is subclassed to return 0/1 and the same is registered again through DataTypeFactory by extending SpringLiquibase class Regards, |
I am using
com.sap.db.jdbc
ngdbc
2.6.29
org.liquibase
liquibase-core
4.1.1
org.liquibase.ext
liquibase-hanadb
4.1.1
Running against HANA MDC 1.00.122.16.1520578817
Receiving exception
liquibase.exception.LockException: liquibase.exception.DatabaseException: Error executing SQL UPDATE CONSUMPTION_API.DATABASECHANGELOGLOCK SET LOCKED = TRUE, LOCKEDBY = 'W-R90XGY6Y (10.26.181.46)', LOCKGRANTED = '2020-10-29 12:08:53.983' WHERE ID = 1 AND LOCKED = FALSE: SAP DBTech JDBC: [266] (at 170): inconsistent datatype: BOOLEAN type is not comparable with SMALLINT type.: line 1 col 171 (at pos 170)
Marked regression because Working with
com.sap.db.jdbc
ngdbc
compile
org.liquibase
liquibase-core
3.4.1
org.liquibase.ext
liquibase-hana
3.4.1-sap-02
Please advise
┆Issue is synchronized with this Jira Bug by Unito
The text was updated successfully, but these errors were encountered: