Restoring table_column which was mistakenly deleted I think

This commit is contained in:
moodler
2006-09-25 01:55:06 +00:00
parent 218eb65122
commit 01c65218a2
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -2286,9 +2286,9 @@ function main_upgrade($oldversion=0) {
}
if ($oldversion < 2006092200) {
table_column('context', 'aggregatelevel', 'contextlevel', 'int', '10', 'unsigned', '0', 'not null', '');
/* 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);*/
execute_sql("ALTER TABLE `{$CFG->prefix}context` ADD UNIQUE INDEX `contextlevel-instanceid` (`contextlevel`, `instanceid`)",false); // see 2006092409 below */
}
if ($oldversion < 2006092201) {
+2 -2
View File
@@ -1885,9 +1885,9 @@ 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);*/
/* execute_sql("ALTER TABLE `{$CFG->prefix}context` DROP INDEX `aggregatelevel-instanceid`;",false);
execute_sql("ALTER TABLE `{$CFG->prefix}context` ADD UNIQUE INDEX `contextlevel-instanceid` (`contextlevel`, `instanceid`)",false); // see 2006092409 below */
}
if ($oldversion < 2006092302) {