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 Fails to Recognize Schema Names Containing the Letter 'i' in diff-changelog Command" #5763

Open
1 of 2 tasks
mehmet-acar-oyakgm opened this issue Apr 3, 2024 · 2 comments

Comments

@mehmet-acar-oyakgm
Copy link

Search first

  • I searched and no similar issues were found

Description

When using Liquibase to perform a diff-changelog operation with specific schemas, it appears that Liquibase fails to properly recognize and compare schema names containing the letter "i" (for example, "Notif"). The command is executed to compare differences between specified schemas and generate a changelog file. However, schema names containing the letter "i" seem to be ignored by Liquibase. This issue may be related to case sensitivity and language settings, requiring careful consideration of the interaction between Liquibase and SQL Server regarding case sensitivity. Here's the Liquibase command experiencing the issue:

liquibase diff-changelog --changelog-file=1sample.xml --includeSchema=true --schemas=Notif,net --url="jdbc:sqlserver://SQLDB;databaseName=POC_TEST;encrypt=false;username=test_user;password=TestD@ta.!" --reference-url="jdbc:sqlserver://SQLDB;databaseName=POC_DEV;encrypt=false;username=dev_user;password=DevD@ta.!"

Steps To Reproduce

1 - Prepare a SQL Server database with schemas containing and not containing the letter 'i'.
2- Using CLI, run the following Liquibase command directly from PowerShell. This command includes schemas with and without the letter 'i' in the --schemas parameter:
liquibase diff-changelog --changelog-file=sample.xml --includeSchema=true --schemas=Notif,net --url="jdbc:sqlserver://SQLDB;databaseName=POC_TEST;encrypt=false;username=test_user;password=TestD@ta.!" --reference-url="jdbc:sqlserver://SQLDB;databaseName=POC_DEV;encrypt=false;username=dev_user;password=DevD@ta.!"

Expected/Desired Behavior

After a fix, Liquibase will successfully recognize schema names containing the letter 'i' and compare changes between these schemas accurately.

Liquibase Version

4.27.0

Database Vendor & Version

Microsoft SQL Server 2017 (RTM-CU31-GDR) (KB5029376) - 14.0.3465.1 (X64) Jul 30 2023 15:31:58 Copyright (C) 2017 Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)

Liquibase Integration

CLI

Liquibase Extensions

No response

OS and/or Infrastructure Type/Provider

Windows 10

Additional Context

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR (Thank you!)
@mehmet-acar-oyakgm
Copy link
Author

Database COLLATE Turkish_CI_AS

@tati-qalified
Copy link
Contributor

tati-qalified commented Apr 24, 2024

@mehmet-acar-oyakgm thank you for reporting this issue, it's a weird edge case and it goes even further than the letter 'i'.
To reproduce this, both databases need to have the collation Turkish_CI_AS - if one of them doesn't, the command will work as expected.
When both have that collation, even using include-schemas=true, without specifying which ones, will cause the error if there are schemas with an 'i' in them.

This is a known problem with the Turkish alphabet and programming - here's some discussion on it.

We'll be leaving this ticket open for the community to propose a fix for. Our development team will be available to provide guidance if needed.

Thank you,
Tatiana

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Open Issues
Development

No branches or pull requests

3 participants