We need a liquibase changeset that ensures that all existing free text units in drug_order.units and drug_order.frequency columns have been mapped to concepts via the OpenmrsConstants.GP_ORDER_ENTRY_UNITS_TO_CONCEPTS_MAPPINGS global property, this changeset should be the very first one in 1.10.x.
It should contain just a customPrecondition that checks that all existing values in drug_order.units and drug_order.frequency columns have been mapped to concepts. The error message thrown by this changeset should cleary inform the user that they need to map the text by editing the OpenmrsConstants.GP_ORDER_ENTRY_UNITS_TO_CONCEPTS_MAPPINGS global property or use the preparation for 1.10 upgrade module to map the text. The changeset's fail message should let the user know that they can use the "prepare for 1.10 upgrade" module (or how to do things manually in the DB). And your database will be in a legal state to run OpenMRS 1.9 and do this.
The precondition should also ensure that a single a concept is not mapped to more than one piece of free text
Custom preconditions can be created by creating a class that implements the liquibase.precondition.CustomPrecondition interface