Skip to content

Database migration fails partially on macOS (and other hosts with case insensitive filesystem) #6139

@stweil

Description

@stweil

Describe the bug

The SQL statements in Kitodo-DataManagement/src/main/resources/db/migration/V2_105__Fixes_#3998.sql which were introduced in pull request #4412 don't work on hosts with a filesystem which is case insensitive (macOS, Windows).

An easy workaround is using an intermediate filename:

Replace

ALTER TABLE client_x_listColumn RENAME TO client_x_listcolumn;

by

ALTER TABLE client_x_listColumn RENAME TO renamed_table;
ALTER TABLE renamed_table RENAME TO client_x_listcolumn;

and similarly for all other renames.

To Reproduce
Steps to reproduce the behavior:

  1. Run migration on macOS.
  2. Check names of database tables.
  3. See error

Expected behavior
Database migration must work on macOS and Windows (and Linux with a case insensitive filesystem), too.

Release
All recent releases up to git master.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions