function node_update_7013

Change {node}.vid default value from 0 to NULL to avoid deadlock issues on MySQL.

Related topics

File

modules/node/node.install, line 918

Code

function node_update_7013() {
    db_drop_unique_key('node', 'vid');
    db_change_field('node', 'vid', 'vid', array(
        'description' => 'The current {node_revision}.vid version identifier.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => FALSE,
        'default' => NULL,
    ));
    db_add_unique_key('node', 'vid', array(
        'vid',
    ));
}

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