function node_update_7011

Update the database from Drupal 6 to match the schema.

Related topics

File

modules/node/node.install, line 863

Code

function node_update_7011() {
  // Drop node moderation field.
  db_drop_field('node', 'moderate');
  db_drop_index('node', 'node_moderate');
  // Change {node_revision}.status field to default to 1.
  db_change_field('node_revision', 'status', 'status', array(
    'type' => 'int',
    'not null' => TRUE,
    'default' => 1,
  ));
  // Change {node_type}.module field default.
  db_change_field('node_type', 'module', 'module', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
  ));
}

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