Migrate data of a custom field


I’m wondering how to go about migrating data stored for a custom field value thats implemented in a jira plugin to a slightly new format? We have an in-house built jira plugin adding a custom field to jira that works similar to the labels field. The field allows adding a list of numbers to any jira ticket and stores that list in the database. Unfortunately a new use-cases requires us to include a ‘type’ along with the number to indicate from which system the number came from. I’m planning to solve this either the a list-of-strings encoding the system type into the string or with a list-of-maps where each map carries a number and the type information.

However so far I couldn’t find anything in the docs about how I would be possibly going about the data-migration issue, i.e. convert all the list-of-numbers to the new type (wether list of string or list of map)?