From 889e6b46f48e0d63bf016befdc08cedf6bd97b20 Mon Sep 17 00:00:00 2001 From: skodak Date: Mon, 31 Jul 2006 18:04:10 +0000 Subject: [PATCH] Bug #6147 - Upgrade from 1.5.x breaks with Postgres 7.4.x MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Even though Postgres 7.4.x is officially supported, several upgrade scripts use syntax that only works in Postgres 8.x. and it's impossible to finish the upgrade. The attached patch fixes those scripts. Saludos. I�aki. Author: I�aki Arenaza Review: Jun Yamog, Martin Langhoff merged from MOODLE_16_STABLE --- lib/db/postgres7.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 6d5c8d0c49..359a03652c 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1544,18 +1544,14 @@ function main_upgrade($oldversion=0) { } } - modify_database('', 'ALTER TABLE prefix_course_request - ALTER COLUMN "password" TYPE varchar(50), - ALTER COLUMN "password" SET DEFAULT \'\''); + table_column('course_request', 'password', 'password', 'varchar', '50', '', ''); - modify_database('', 'ALTER TABLE prefix_course - ALTER COLUMN currency TYPE varchar(3)'); + table_column('course', 'currency', 'currency', 'varchar', '3'); modify_database('', 'ALTER TABLE prefix_course_categories ALTER COLUMN path SET DEFAULT \'\''); - modify_database('', 'ALTER TABLE prefix_log_display - ALTER COLUMN module TYPE varchar(20)'); + table_column('log_display', 'module', 'module', 'varchar', '20'); modify_database("","DROP INDEX id_user_idx"); modify_database("","DROP INDEX post_lastmodified_idx"); -- 2.39.5