Skip to content

Commit

Permalink
MDL-21657 Fixing regression - wrong SQL upgrade code
Browse files Browse the repository at this point in the history
Would be nice if core developers actually tried to run the code before
they commit it into the repository.
  • Loading branch information
mudrd8mz committed Apr 22, 2010
1 parent 55c6372 commit 62b1d51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mod/forum/db/upgrade.php
Expand Up @@ -290,7 +290,7 @@ function xmldb_forum_upgrade($oldversion) {
require_once($CFG->dirroot . '/lib/db/upgradelib.php');

//forum ratings only have a single time column so use it for both time created and modified
$sql = "INSERT {rating} (contextid, scaleid, itemid, rating, userid, timecreated, timemodified)
$sql = "INSERT INTO {rating} (contextid, scaleid, itemid, rating, userid, timecreated, timemodified)
SELECT cxt.id, f.scale, r.post AS itemid, r.rating, r.userid, r.time AS timecreated, r.time AS timemodified
FROM {forum_ratings} r
JOIN {forum_posts} p ON p.id=r.post
Expand Down
2 changes: 1 addition & 1 deletion mod/glossary/db/upgrade.php
Expand Up @@ -265,7 +265,7 @@ function xmldb_glossary_upgrade($oldversion) {
require_once($CFG->dirroot . '/lib/db/upgradelib.php');

//glossary ratings only have a single time column so use it for both time created and modified
$sql = "INSERT {rating} (contextid, scaleid, itemid, rating, userid, timecreated, timemodified)
$sql = "INSERT INTO {rating} (contextid, scaleid, itemid, rating, userid, timecreated, timemodified)
SELECT cxt.id, g.scale, r.entryid AS itemid, r.rating, r.userid, r.time AS timecreated, r.time AS timemodified
FROM {glossary_ratings} r
JOIN {glossary_entries} ge ON ge.id=r.entryid
Expand Down

0 comments on commit 62b1d51

Please sign in to comment.