We just upgraded to liquidbase 4.4.0 and it seems that our custom class does not get executed anymore
@DataTypeInfo(name=“number”, aliases = {“numeric”, “java.sql.Types.NUMERIC”},
minParameters = 0, maxParameters = 2, priority = LiquibaseDataType.PRIORITY_DATABASE)
public class NumberTypeEIRDerby extends NumberType {
@Override
public int getPriority() {
return PRIORITY_DATABASE +1;
}
@Override
public boolean supports(Database database) {
return database instanceof DerbyDatabase;
}
@Override
public DatabaseDataType toDatabaseDataType(Database database) {
if (database instanceof DerbyDatabase) {
Object[] numericParams = getParameters();
if(numericParams != null && numericParams.length > 0) {
Integer a = Integer.valueOf((String) numericParams[0]);
a = Math.min(31, a.intValue());
numericParams[0] = a.toString();
}
return new DatabaseDataType("NUMERIC", numericParams);
}
return super.toDatabaseDataType(database);
}
}
Anything we are doing wrong? It used to work with version 3