function system_update_6000 in Drupal 6
Remove auto_increment from {boxes} to allow adding custom blocks with visibility settings.
Related topics
File
- modules/
system/ system.install, line 1213
Code
function system_update_6000() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$max = (int) db_result(db_query('SELECT MAX(bid) FROM {boxes}'));
$ret[] = update_sql('ALTER TABLE {boxes} CHANGE COLUMN bid bid int NOT NULL');
$ret[] = update_sql("REPLACE INTO {sequences} VALUES ('{boxes}_bid', {$max})");
break;
}
return $ret;
}