Solved

Data conversion error during upgrade

  • 21 February 2023
  • 2 replies
  • 64 views

Userlevel 2
Badge +5

hi,

We have added a data conversion for a new, mandatory column in a table. The default value is an expression, getting the value from another table “settings”.

The problem is, that this table “settings” also has some changes in this update, and the tabel is also rebuild during the update. So at the time the value should be calculated, the table setting is renamed __setting__ and the new table is empty. So no value is found and the update fails.

Is it possible to have some sort of sequence in rebuilding the tables? Or how can I solve this issue?

 

 

icon

Best answer by Mark Jongeling 22 February 2023, 08:01

View original

This topic has been closed for comments

2 replies

Userlevel 7
Badge +23

Hi Tejo,

You can safely base your default value expression on the "old” setting table, the one with the underscores. This contains all the values of the table before it gets upgraded.

The Upgrade process of migrating data from the underscore-table to the new table looks to be Alphabetical and its order cannot be altered. All tables that need to be rebuild, either because they have been altered in a way or that have been manually checked to be Rebuild in the Data migration screen, will be renamed with underscores. Therefore any default value expression should then use the underscore-table for its value, unless said table will not be affected by the upgrade.

Hope this helps!

Userlevel 2
Badge +5

Thanks Mark, I didn’t know the ‘underscore’ tables could be part of the model, thought they are more under the hood parts :-) 
Can there be a validation that triggers this kind of faults in the model?