You are here

function node_update_7013 in Drupal 7

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

Related topics

File

modules/node/node.install, line 918
Install, update and uninstall functions for the node module.

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',
  ));
}