From ba39fa10ccf26b25b81ea212e62f4f53f61d08ad Mon Sep 17 00:00:00 2001 From: moodler Date: Thu, 29 Jan 2004 04:13:55 +0000 Subject: [PATCH] Change type of config->value to text (to allow longer info) --- lib/db/mysql.php | 3 +++ lib/db/mysql.sql | 2 +- lib/db/postgres7.php | 4 ++++ lib/db/postgres7.sql | 2 +- version.php | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/lib/db/mysql.php b/lib/db/mysql.php index c125bd375ae..1fe42506f7e 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -630,6 +630,9 @@ function main_upgrade($oldversion=0) { ) TYPE=MyISAM COMMENT='Allows modules to store arbitrary user preferences'; "); } + if ($oldversion < 2004012900) { + table_column("config", "value", "value", "text", "", "", ""); + } return $result; diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 0682cafa4b0..b875ebf4c20 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -17,7 +17,7 @@ CREATE TABLE `prefix_config` ( `id` int(10) unsigned NOT NULL auto_increment, `name` varchar(255) NOT NULL default '', - `value` varchar(255) NOT NULL default '', + `value` text NOT NULL default '', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`) ) TYPE=MyISAM COMMENT='Moodle configuration variables'; diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index 3885f161147..5470e3e24e1 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -376,6 +376,10 @@ function main_upgrade($oldversion=0) { modify_database("", "CREATE INDEX prefix_user_preferences_useridname_idx ON prefix_user_preferences (userid,name);"); } + if ($oldversion < 2004012900) { + table_column("config", "value", "value", "text", "", "", ""); + } + return $result; } diff --git a/lib/db/postgres7.sql b/lib/db/postgres7.sql index efe274a7ef6..ba5c44e8448 100644 --- a/lib/db/postgres7.sql +++ b/lib/db/postgres7.sql @@ -1,7 +1,7 @@ CREATE TABLE prefix_config ( id SERIAL PRIMARY KEY, name varchar(255) NOT NULL default '', - value varchar(255) NOT NULL default '', + value text NOT NULL default '', CONSTRAINT config_name_uk UNIQUE (name) ); diff --git a/version.php b/version.php index 7fd5b3270b6..be3924d3d24 100644 --- a/version.php +++ b/version.php @@ -5,7 +5,7 @@ // database to determine whether upgrades should // be performed (see lib/db/*.php) -$version = 2004012800; // The current version is a date (YYYYMMDDXX) +$version = 2004012900; // The current version is a date (YYYYMMDDXX) $release = "1.2 development"; // User-friendly version number