From f184d1610bb52e73ca4bb818e5cb44e013acc3a7 Mon Sep 17 00:00:00 2001 From: martinlanghoff Date: Wed, 17 May 2006 06:25:20 +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 22c35323225..dab254bf7ab 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 ce9a521651d..830cb1b55fa 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;