From dbfc642a87b859d8a65ee193890c7d7fb0d3461e Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 17 May 2006 06:42:28 +0000 Subject: [PATCH] moodle16cleanup: mod/forum correctly dropping the constraint, so it does not report an error during upgrade --- mod/forum/db/postgres7.php | 5 +++++ mod/forum/version.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/forum/db/postgres7.php b/mod/forum/db/postgres7.php index 22c3532322..dab254bf7a 100644 --- a/mod/forum/db/postgres7.php +++ b/mod/forum/db/postgres7.php @@ -171,6 +171,11 @@ function forum_upgrade($oldversion) { table_column('forum_posts','','mailnow','integer'); } + if ($oldversion < 2006011701) { + execute_sql("ALTER TABLE {$CFG->prefix}forum DROP CONSTRAINT {$CFG->prefix}forum_type_check"); + } + + return true; } diff --git a/mod/forum/version.php b/mod/forum/version.php index ce9a521651..830cb1b55f 100644 --- a/mod/forum/version.php +++ b/mod/forum/version.php @@ -5,7 +5,7 @@ // This fragment is called by /admin/index.php //////////////////////////////////////////////////////////////////////////////// -$module->version = 2006011700; +$module->version = 2006011701; $module->requires = 2005031000; // Requires this Moodle version $module->cron = 60; -- 2.39.5