I found myself having to hack data_get_field_definitions in order to add in a new field definition:

    'bigtext' => array(
      'type' => 'text',
      'not null' => FALSE,
      'size' => 'big',
    ),

It would be nice if I could do this with a hook!

CommentFileSizeAuthor
#3 bigtext.patch599 bytesphayes

Comments

phayes’s picture

Assigned: Unassigned » phayes

P.S If the maintainers think this is a good idea, I will write the patch.

alex_b’s picture

I'd say we should actually add the bigtext definition into data_get_field_definitions() itself. Ideally, we can define most commonly used permutations in data_get_field_definitions().

This could be clearly too many permutations, but at that point, I'd rather think of refactoring the way how fields are defined (I'm not too much in love with data_get_field_definitions() anyway). Having an alter hook and depending modules out there would be an obstacle then.

Care to roll a patch for adding the field definition to data_get_field_definitions() ?

phayes’s picture

StatusFileSize
new599 bytes

Patch attached

alex_b’s picture

Title: hook for data_get_field_definitions » Big text support
Status: Active » Fixed

Committed, thank you.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.