Permalink
Browse files

MDL-34840 fix fatal pg error during upgrade

This is a regression caused by MDL-30515
  • Loading branch information...
1 parent c36de79 commit 76bdfc1d79ada9f1b1ac72eac7b6b1cac070dec7 @skodak skodak committed Aug 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/db/upgrade.php
View
2 lib/db/upgrade.php
@@ -164,7 +164,7 @@ function xmldb_main_upgrade($oldversion) {
$index = new xmldb_index('contextid-lowerboundary-letter', XMLDB_INDEX_UNIQUE, array('contextid', 'lowerboundary', 'letter'));
// MDL-30515 Removing duplicate entries before adding the unique index
- $sql = "SELECT MAX(id) as newestid, contextid, lowerboundary, letter, COUNT('x') count
+ $sql = "SELECT MAX(id) as newestid, contextid, lowerboundary, letter, COUNT('x') AS dcount
FROM {grade_letters}
GROUP BY contextid, lowerboundary, letter
HAVING COUNT('x') > 1";

0 comments on commit 76bdfc1

Please sign in to comment.