Skip to content

Align dbName with actual database table and field names #1348

@danchanka

Description

@danchanka

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions