From dd0bd5088c6d24bae6041cfa50e8c9e9e2a00e9a Mon Sep 17 00:00:00 2001 From: moodler Date: Mon, 21 Jul 2003 14:28:04 +0000 Subject: [PATCH] Increase the size of the field to store sequences in course_sections --- lib/db/mysql.php | 4 ++++ lib/db/mysql.sql | 2 +- lib/db/postgres7.php | 4 ++++ lib/db/postgres7.sql | 2 +- version.php | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 15d3b235dc..8375a66b9d 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -401,6 +401,10 @@ function main_upgrade($oldversion=0) { table_column("course", "", "visible", "integer", "1", "unsigned", "1", "", "marker"); } + if ($oldversion < 2003072101) { + table_column("course_sections", "sequence", "sequence", "text", "", "", "", "", ""); + } + return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index f9a9035bfd..f3b0c9b91b 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -110,7 +110,7 @@ CREATE TABLE `prefix_course_sections` ( `course` int(10) unsigned NOT NULL default '0', `section` int(10) unsigned NOT NULL default '0', `summary` text NOT NULL, - `sequence` varchar(255) NOT NULL default '', + `sequence` text NOT NULL default '', `visible` tinyint(1) NOT NULL default '1', PRIMARY KEY (`id`) ) TYPE=MyISAM; diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 90ad22fd3f..573f26a6c1 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -172,6 +172,10 @@ function main_upgrade($oldversion=0) { table_column("course", "", "visible", "integer", "1", "unsigned", "1", "", "marker"); } + if ($oldversion < 2003072101) { + table_column("course_sections", "sequence", "sequence", "text", "", "", "", "", ""); + } + return $result; } ?> diff --git a/lib/db/postgres7.sql b/lib/db/postgres7.sql index 15088c85cd..2cdc2c914b 100644 --- a/lib/db/postgres7.sql +++ b/lib/db/postgres7.sql @@ -59,7 +59,7 @@ CREATE TABLE prefix_course_sections ( course integer NOT NULL default '0', section integer NOT NULL default '0', summary text NOT NULL default '', - sequence varchar(255) NOT NULL default '', + sequence text NOT NULL default '', visible integer NOT NULL default '1' ); diff --git a/version.php b/version.php index ee187c033e..30a3099e8e 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ // database to determine whether upgrades should // be performed (see lib/db/*.php) -$version = 2003072100; // The current version is a date (YYYYMMDDXX) +$version = 2003072101; // The current version is a date (YYYYMMDDXX) $release = "1.1 development"; // User-friendly version number -- 2.39.5