Bug #6147 - Upgrade from 1.5.x breaks with Postgres 7.4.x

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
This commit is contained in:
skodak
2006-07-31 18:04:10 +00:00
parent 365525fc51
commit 889e6b46f4
+3 -7
View File
@@ -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");