]> git.mjollnir.org Git - moodle.git/commitdiff
Clean empty role_names. MDL-15284 ; merged from 19_STABLE
authorstronk7 <stronk7>
Thu, 3 Jul 2008 17:07:54 +0000 (17:07 +0000)
committerstronk7 <stronk7>
Thu, 3 Jul 2008 17:07:54 +0000 (17:07 +0000)
lib/db/upgrade.php

index 70483e45302650090bd62af375905016316c6efe..904d1e2699314f9f2eb750bda8fd231627f49179 100644 (file)
@@ -187,6 +187,11 @@ function xmldb_main_upgrade($oldversion=0) {
         upgrade_main_savepoint($result, 2008063002);
     }
 
+    if ($result && $oldversion < 2008070300) {
+        $result = $DB->delete_records_select('role_names', $DB->sql_isempty('role_names', 'name', false, false));
+        upgrade_main_savepoint($result, 2008070300);
+    }
+
 /*
  * TODO:
  *   drop adodb_logsql table and create a new general sql log table