function trigger_update_7001

Increase the length of the "hook" field to 78 characters.

This is a separate function for those who ran an older version of trigger_update_7000() that did not do this.

Related topics

File

modules/trigger/trigger.install, line 93

Code

function trigger_update_7001() {
    db_drop_primary_key('trigger_assignments');
    db_change_field('trigger_assignments', 'hook', 'hook', array(
        'type' => 'varchar',
        'length' => 78,
        'not null' => TRUE,
        'default' => '',
        'description' => 'Primary Key: The name of the internal Drupal hook; for example, node_insert.',
    ), array(
        'primary key' => array(
            'hook',
            'aid',
        ),
    ));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.