Upgrading table to rename the context->aggregatelevel field which was
really bugging me. Code should be a little bit more readable now. Apologies to those with non-core code already using this field.
This commit is contained in:
@@ -1884,6 +1884,12 @@ function main_upgrade($oldversion=0) {
|
||||
|
||||
}
|
||||
|
||||
if ($oldversion < 2006092200) {
|
||||
execute_sql("ALTER TABLE `{$CFG->prefix}context` DROP INDEX `aggregatelevel-instanceid`;",false);
|
||||
table_column('context', 'aggregatelevel', 'contextlevel', 'int', '10', 'unsigned', '0', 'not null', '');
|
||||
execute_sql("ALTER TABLE `{$CFG->prefix}context` ADD UNIQUE INDEX `contextlevel-instanceid` (`contextlevel`, `instanceid`)",false);
|
||||
}
|
||||
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user