I have a custom data set with a number of custom fields set as alphanumeric text fields - it's become clear that some of these would be better as note/text areas.

Because I'm increasing the size of the fields, rather than decreasing them and potentially cutting off existing data, I'm hoping it's possible to change them in the database.

From what I can see, the only tables affected are civicrm_custom_field (where I'd be changing data_type and html_type) and the civicrm_value_custom_data_set (where I'd be changing the relevant field's Type from varchar to text and removing the 255 character limit).

There's only a small amount of data entered using the custom data set, but I'd rather not have to re-enter everything (particularly as it means deleting and recreating the custom fields as well as the data).

Is this possible? Is there anywhere else I need to change the settings? Or is this just generally a horrible idea?

1 Answer 1


you are making the job harder - just create an Temp table (Export) move all your custom data to it. Delete the unwanted custom field and create new custom field as you needed

Once you have created all the custom field as per your requirement just move all the data from temp table to the new custom field table - job done.

  • 1
    To be honest, it's not losing the data that's the issue (I can export/import from the UI, and it's all of 6 records) - it's the process of deleting and creating new custom fields that is time-consuming. (Particularly when the fields have to be deleted before fields with the same name are added, so I have to take a note of all the existing settings, pre- and post- help fields, etc before deleting the fields and re-entering them).
    – liblogger
    Sep 30, 2015 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.