Retain NUMBER(10,0) instead of NUMBER(*,0)

I am upgrading Liquibase to 4.3.5 from 3.3.0. The database is Oracle. I have almost never specified a precision and scale for NUMBER types.

What this means for my upgrade is most of the existing NUMBER column types were created with an older version of Liquibase which created them as NUMBER(10,0). Depending on which version of the database the customer is upgrading from, they will have some number of mix and matched columns specified with NUMBER(10,0) and NUMBER(*,0) due to some changesets having been ran under the (10,0) precision/scale which will be ignored during upgrade.

Because there are over a thousand of these in the DDL, I prefer to do the impact investigation at a later date and proceed with the Liquibase upgrade.

That’s what I would like to do but I am not sure if what I need exists. I am looking for a way to force NUMBER column types to be generated as NUMBER(10,0) as they would have with our prior Liquibase version.

I’ve seen some references to the notion of a Custom Type conversion extension/plug-in/? But the information I found was dated <= ~2014.

Does a custom type conversion facility exist? And/or are there better ways to address my desire to retain the (10,0) precision/scale?

Hello,

May be this link can help you resolve your issue:
https://docs.liquibase.com/workflows/database-setup-tutorials/tutorial-using-oracle.html

regards,
Ahmed.

Thank you for leading me to helpful information on Liquibase with Oracle, ahmedabdeljelil. I reviewed the document and believe I can use that to take the step of re-typing the NUMBER(10,0) columns to NUMBER(38,0). That would lead to a lot of changesets to capture all of the columns needing this.

However, I’m still looking for a way to do custom type mapping that may allow the types assigned to columns whose type is specified as NUMBER to be intercepted and/or transformed into NUMBER(10,0). My hope is there is a simple few lines in a specially named or specially placed class that would do this.

I resolved this by adding a changeset that sets all (10,0) NUMBERS to (38,0).