My colleague and I have been co-authoring an app that has been evolving over time. The basic premise is that project managers will report back on their projects once a month and that data is collected and aggregated into dashboards and reports in our outsystems app. The app was a huge success and now we have lots of new suggestions for features, which has led me to our present conundrum.

We were both learning the platform when we built this app, so we made a few perhaps inadvisable decisions along the way. One is that we made two new attributes to the monthly report entity, both intended to store feedback solicited from the project managers. We'll call them lessons learned and suggested improvements.

We have now been asked to allow for the possibility of more than one lesson/suggestion to be captured per monthly report. Since the attribute lives on that entity, this is currently not possible with the data structure as it stands.

My first thought was the following:

  1. Create a new entity for each or both of these attributes and allow a one-to-many relationship between the monthly report entity and the new entity(-ies). 
  2. Then, use a foreach command to go through all of the monthly reports and insert the existing lesson and suggestion data into the new entity(-ies).
  3. Rewrite all references in the software to the old attributes and point them to the new entity(-ies) instead.
  4. Delete the old attributes from the monthly report entity.

I feel like this should work but I am a bit anxious. Can anyone confirm this is a solid course of action or make any suggestions that would be better? Thanks!

Hi Jared,

You are right that should work. The only thing I would do different is do the step 3 before 2.