Converting inherited record to base record

2
Due to a redesign of the model some inheritance was removed in the sense that the inherited entities are removed. When starting the application I noticed that the records from the removed entities were removed from the database. What I would like is an easy way to keep those records. I was looking into SQL statements and got as far as changing the database ID to contain the right short_id of the entity. But I noticed here duplicate ID's for records from different inherited entities, so something is needed to make them unique. I do not understand how the 48-bit part of the ID is generated from the sequence number. { This is a one time upgrade from 4.2.2 to 4.4.x, so future changes to the numbering are irrelevant }. A dialog question in the modeler whether or not to preserve the base data would be the nicest solution BTW. Export/Import is cumbersome due to model changes. Update: I will look into adding an upgrade module to the old situation, filling records with microflows and try to merge that module into the new situation. That saves me the excel export/import. In the new situation I will use again microflows to put the information in the right place. This will take me some time... Thanks for the ideas.
asked
3 answers
1

You could also opt to do this in a 2 step solution. First add the attributes to your generalization object and you build microflows that migrate your data from the specializations to the generalization. When finished you remove the objects all together and then you do another deployment.

Pro's: No database interaction needed at all, you have more controll of your data.

Con's: takes longer.

answered
1

In addition to Pieter' answer:

Note that copying attributes from child to parent is not enough. By removing the child domain object all parents will be removed too. So you have to create whole new records in the parent table. Unfortunately you can't bypass this behavior.

answered
0

On a old database I would just create a form with all the data you want to export (including the unique field of the parent so you can make a reference when doing a import again) and do a Excel of csv export.

Then just use this file to do an Excel import again on the new model. This way you can set everything right with microflows when doing the import and make sure that the database is consisten again.

Regards,

Ronald

answered