Defining a rule for handling data breaking changes

This post explains how data model changes are handled in OutSystems. However, it does not mention anything about a predefined rule/action that could be executed in such situations. For example, for changing the data type of an attribute, OutSystems tries to convert the existing values into the new data type. If the conversion is not possible or would cause data loss, no change is made, and OutSystems displays the Database Upgrade Error. Can we define a general rule/action for such scenarios?

For instance, although there is a string Age field in the database and it is supposed to store integer values, some records have the Age in letters rather than a number. If I decide to change the data type to Number, can I define a deployment rule, such that OutSystems can replace each problematic value with 0, for example? 

Hello MohammadAmin,

Please try this link. Hope it will resolve your query regarding attribute's data type change.

Else, you can go for either of these option -

1. Create a new attribute with integer data type and use it in your code

2. Delete the data of your text attribute from database and then change it's data type to integer.

Thanks & Kind Regards,

Sachin

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.