You are here

function system_update_6025 in Drupal 6

Increase the maximum length of node titles from 128 to 255.

Related topics

File

modules/system/system.install, line 2076

Code

function system_update_6025() {
  $ret = array();
  db_drop_index($ret, 'node', 'node_title_type');
  db_change_field($ret, 'node', 'title', 'title', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
  ));
  db_add_index($ret, 'node', 'node_title_type', array(
    'title',
    array(
      'type',
      4,
    ),
  ));
  db_change_field($ret, 'node_revisions', 'title', 'title', array(
    'type' => 'varchar',
    'length' => 255,
    'not null' => TRUE,
    'default' => '',
  ));
  return $ret;
}