Currently, profile2_regpath_schema() defines ['profile2_regpath']['misc'] as 'text' / 'big'.
And then in a number of places it calls serialize() and unserialize().
This also means that features are exported as serialized string.

Instead, it could use a dedicated type that natively handles serialization. I think the common way to do this is 'blob' + 'serialize'.
E.g.

function field_schema() {
  // Static (meta) tables.
  $schema['field_config'] = array(
    'fields' => array(
      [..]
      'data' => array(
        'type' => 'blob',
        'size' => 'big',
        'not null' => TRUE,
        'serialize' => TRUE,
        'description' => 'Serialized data containing the field properties that do not warrant a dedicated column.',
      ),

Doing it like this can reduce fragility, and avoid bugs in the future, and maybe even fix some existing bugs.

Comments

donquixote created an issue.