function system_update_7018

7.x system.install system_update_7018()

Shorten the {system}.type column and modify indexes.

Related topics

File

drupal-7.x/modules/system/system.install, line 2108
Install, update and uninstall functions for the system module.

Code

function system_update_7018() {
  db_drop_index('system', 'modules');
  db_drop_index('system', 'type_name');
  db_change_field('system', 'type', 'type', array('type' => 'varchar', 'length' => 12, 'not null' => TRUE, 'default' => ''));
  db_add_index('system', 'type_name', array('type', 'name'));
}