Skip to content

Commit

Permalink
Restoring table_column which was mistakenly deleted I think
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Sep 25, 2006
1 parent 218eb65 commit 01c6521
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/db/mysql.php
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions lib/db/postgres7.php
Expand Up @@ -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) {
Expand Down

0 comments on commit 01c6521

Please sign in to comment.