Skip to content

Conversation

@filipelautert filipelautert marked this pull request as ready for review July 11, 2024 23:12
@StevenMassaro
Copy link
Contributor

Are there any tests which cover these changes? If not, can one or some be added?

@mmelnik
Copy link

mmelnik commented Jun 3, 2025

@filipelautert Hi, Filipe,

I've recently switched to liquibase-core 4.29.2 from 4.27.0 in my project and found that Oracle diff calculation is broken because of changes in this pull reuqest, especially because of this implementation of OracleDatabase.correctObjectName():

@Override
public String correctObjectName(String objectName, Class<? extends DatabaseObject> objectType) {
    // Internally Oracle converts int/integer to number, so when we need to extract and compare it we need number too
    if (objectType.equals(Column.class) && StringUtils.startsWithIgnoreCase(objectName, "int")) {
        return "NUMBER(*, 0)";
    }
    return super.correctObjectName(objectName, objectType);
}

This method automatically converts all column names that starts from int*, like "internalPhoneNumber" to "NUMBER(*, 0)" and brakes Metadata comparison so diff generation is incorrect.

Exact thing is StringUtils.startsWithIgnoreCase(objectName, "int") - I confused a little bit why we're unconditionally change objectName which can be the column name itself and not the COLUMN TYPE name?

I might be wrong, but this looks like bug to me. Could you or someone from the team help me to clarify that, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants