X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=lib%2Fdb%2Fupgrade.php;fp=lib%2Fdb%2Fupgrade.php;h=f303a26b3d66e62e986b4adb7f69b669417a1703;hp=32e600084e1a13eb867d44738f8120f31eebfaa8;hb=79c2b50980f5b90a06efbff4c866f7ce34f92108;hpb=0ad654dc8bb214538b3320c745b28bd711b2bb3b;ds=sidebyside diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 32e600084e1..f303a26b3d6 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -769,17 +769,17 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2012052900.05); } - if ($oldversion < 2012060100.01) { + if ($oldversion < 2012060600.01) { // Add field referencehash to files_reference $table = new xmldb_table('files_reference'); $field = new xmldb_field('referencehash', XMLDB_TYPE_CHAR, '40', null, XMLDB_NOTNULL, null, null, 'reference'); if (!$dbman->field_exists($table, $field)) { $dbman->add_field($table, $field); } - upgrade_main_savepoint(true, 2012060100.01); + upgrade_main_savepoint(true, 2012060600.01); } - if ($oldversion < 2012060100.02) { + if ($oldversion < 2012060600.02) { // Populate referencehash field with SHA1 hash of the reference - this shoudl affect only 2.3dev sites // that were using the feature for testing. Production sites have the table empty. $rs = $DB->get_recordset('files_reference', null, '', 'id, reference'); @@ -789,10 +789,10 @@ function xmldb_main_upgrade($oldversion) { } $rs->close(); - upgrade_main_savepoint(true, 2012060100.02); + upgrade_main_savepoint(true, 2012060600.02); } - if ($oldversion < 2012060100.03) { + if ($oldversion < 2012060600.03) { // Merge duplicate records in files_reference that were created during the development // phase at 2.3dev sites. This is needed so we can create the unique index over // (repositoryid, referencehash) fields. @@ -815,10 +815,10 @@ function xmldb_main_upgrade($oldversion) { } $duprs->close(); - upgrade_main_savepoint(true, 2012060100.03); + upgrade_main_savepoint(true, 2012060600.03); } - if ($oldversion < 2012060100.04) { + if ($oldversion < 2012060600.04) { // Add a unique index over repositoryid and referencehash fields in files_reference table $table = new xmldb_table('files_reference'); $index = new xmldb_index('uq_external_file', XMLDB_INDEX_UNIQUE, array('repositoryid', 'referencehash')); @@ -827,7 +827,7 @@ function xmldb_main_upgrade($oldversion) { $dbman->add_index($table, $index); } - upgrade_main_savepoint(true, 2012060100.04); + upgrade_main_savepoint(true, 2012060600.04); } return true;