system_update_6032

Versions
6
system_update_6032()

profile_fields.name used to be nullable but is part of a unique key and so shouldn't be.

Related topics

Code

modules/system/system.install, line 2133

<?php
function system_update_6032() {
  $ret = array();
  if (db_table_exists('profile_fields')) {
    db_drop_unique_key($ret, 'profile_fields', 'name');
    db_change_field($ret, 'profile_fields', 'name', 'name', array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, 'default' => ''));
    db_add_unique_key($ret, 'profile_fields', 'name', array('name'));
  }
  return $ret;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.