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

Align dbName with actual database table and field names #1348

Open
danchanka opened this issue Dec 9, 2024 · 0 comments
Open

Align dbName with actual database table and field names #1348

danchanka opened this issue Dec 9, 2024 · 0 comments

Comments

@danchanka
Copy link
Collaborator

Currently, the dbName for fields and tables does not match the actual names created in the database. Specifically, in PostgreSQL, these names are created in lowercase by default, whereas they are stored in the database structure without being converted to lowercase. This mismatch can lead to various problems, such as the one described in #1329.

In version 6, additional checks were added during table and field renaming to fix the issue temporarily. However, this is a non-portable solution, and the goal is to implement a proper fix.

Possible Solutions:

  • Support case sensitivity for names.

    Modify queries to support case-sensivity (for example, wrap names in quotes for PostgreSQL).

  • Modify dbNamingPolicy to generate names exactly as they will appear in the database (partially implemented).

    A branch, dbname_lowercase, has been created to introduce these changes into default dbNamingPolicy (e.g. always convert names to lowercase). The added checks from version 6 have been removed in this branch. However, these changes are insufficient. Additionally, we must:

    1. Implement data preservation in the corresponding reflection tables.
    2. Design a solution to support "future backward compatibility" in case a user decides to run the server on version 6 of the platform after upgrading to the latest version.

    Some of the issues related to this have been moved to separate issues.

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

No branches or pull requests

1 participant