Skip to content
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

Liquibase create NVARCHAR instead of VARCHAR #38

Open
radianer opened this issue Oct 19, 2020 · 4 comments
Open

Liquibase create NVARCHAR instead of VARCHAR #38

radianer opened this issue Oct 19, 2020 · 4 comments

Comments

@radianer
Copy link

radianer commented Oct 19, 2020

Hi,

I have a change like this:

<column name="description" type="VARCHAR(255)"/>

if i run mvn liquibase:update it create the columns with NVARCHAR(255).
This result in to validation errors if i start my spring boot application.

Can someone explain me that behavior or explain me how i can change that?

┆Issue is synchronized with this Jira Bug by Unito

@zrav
Copy link

zrav commented May 4, 2021

We're also hitting this issue when running against HANA Cloud (4.00.000.00). With on-premise HANA (2.00.055.00) it works as expected.

EDIT: While I saw that liquibase-hanadb has explicit special-casing for version >= 4 that uses N* for the string types, I noticed that it doesn't even matter, as HANA 4 silently converts the types to N* anyway. So there's nothing that can be done here.

Now looking for a way to make Hibernate not explode due to unexpected data types. Unfortunately spring.jpa.properties.hibernate.use_nationalized_character_data=true doesn't have any effect...

@r2-lf
Copy link
Contributor

r2-lf commented May 4, 2021

Hi, @breglerj ! How can we help? Thanks!

@breglerj
Copy link
Collaborator

breglerj commented May 4, 2021

@zrav as you already found out HANA Cloud only supports N* string types. That's why the liquibase-hanadb has the explicit switch. You can find more information on the differences between HANA Cloud and HANA 2 in the SAP HANA Cloud Compatibility and Migration Information guide.

Hibernate has a HANA Cloud dialect (org.hibernate.dialect.HANACloudColumnStoreDialect) since version 5.4.15. That should get you around the unexpected data type errors.

@zrav
Copy link

zrav commented May 5, 2021

@breglerj Thank you, that was the bit of information I was missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants