From 0f51ca79228983e67f8a3f606c23e659e6ce331f Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Tue, 16 Mar 2010 09:20:23 +0000 Subject: [PATCH] rating MDL-21657 changed table from ratings (plural) to rating (singular) --- lib/db/upgrade.php | 10 ++++++++-- version.php | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 5a58cb8630d..cef11b5a575 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -3051,7 +3051,13 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); upgrade_main_savepoint($result, 2010021800); } - if ($result && $oldversion < 2010031600) { + if ($result && $oldversion < 2010031602) { + //drop the erroneously created ratings table + $table = new xmldb_table('ratings'); + if ($dbman->table_exists($table)) { + $dbman->drop_table($table); + } + //create the rating table (replaces module specific rating implementations) $table = new xmldb_table('rating'); @@ -3124,7 +3130,7 @@ inner join {data} d on d.id=re.dataid'; //todo drop forum_ratings, data_ratings and glossary_ratings - upgrade_main_savepoint($result, 2010031600); + upgrade_main_savepoint($result, 2010031602); } return $result; diff --git a/version.php b/version.php index 1715960ca6a..19e6dcd4f70 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2010031600; // YYYYMMDD = date of the last version bump + $version = 2010031602; // YYYYMMDD = date of the last version bump // XX = daily increments $release = '2.0 dev (Build: 20100316)'; // Human-friendly version name