function node_update_7016

Change {history}.nid to an unsigned int in order to match {node}.nid.

Related topics

File

modules/node/node.install, line 950

Code

function node_update_7016() {
    db_drop_primary_key('history');
    db_drop_index('history', 'nid');
    db_change_field('history', 'nid', 'nid', array(
        'description' => 'The {node}.nid that was read.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
    ));
    db_add_primary_key('history', array(
        'uid',
        'nid',
    ));
    db_add_index('history', 'nid', array(
        'nid',
    ));
}

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