From 93fd7cb10cc9dca86b03443a9ec8661be754eecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0koda?= Date: Sat, 30 Jun 2012 13:57:55 +0200 Subject: [PATCH] MDL-34121 drop unused backup tables that were supposed to be dropped long ago The backup/restore leftovers that referenced these will be dropped in 2.4 --- lib/db/install.xml | 32 ++------------------------------ lib/db/upgrade.php | 23 +++++++++++++++++++++++ version.php | 2 +- 3 files changed, 26 insertions(+), 31 deletions(-) diff --git a/lib/db/install.xml b/lib/db/install.xml index 38ef87ec592..1d88b4d12cc 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -2410,7 +2410,7 @@ - +
@@ -2421,35 +2421,7 @@
- - - - - - - - - - - - - -
- - - - - - - - - - - - - -
- +
diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 3be8b80bf88..b737428ef6f 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -871,6 +871,29 @@ function xmldb_main_upgrade($oldversion) { upgrade_main_savepoint(true, 2012062000.01); } + if ($oldversion < 2012062500.01) { + // Drop some old backup tables, not used anymore + + // Define table backup_files to be dropped + $table = new xmldb_table('backup_files'); + + // Conditionally launch drop table for backup_files + if ($dbman->table_exists($table)) { + $dbman->drop_table($table); + } + + // Define table backup_ids to be dropped + $table = new xmldb_table('backup_ids'); + + // Conditionally launch drop table for backup_ids + if ($dbman->table_exists($table)) { + $dbman->drop_table($table); + } + + // Main savepoint reached + upgrade_main_savepoint(true, 2012062500.01); + } + return true; } diff --git a/version.php b/version.php index 6739bbecf88..0a9d706b9ee 100644 --- a/version.php +++ b/version.php @@ -30,7 +30,7 @@ defined('MOODLE_INTERNAL') || die(); -$version = 2012062500.00; // 2012062500 = branching date YYYYMMDD - do not modify! +$version = 2012062500.01; // 2012062500 = branching date YYYYMMDD - do not modify! // RR = release increments - 00 in DEV branches // .XX = incremental changes