From: moodler Date: Thu, 29 Jan 2004 04:13:55 +0000 (+0000) Subject: Change type of config->value to text (to allow longer info) X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ba39fa10ccf26b25b81ea212e62f4f53f61d08ad;p=moodle.git Change type of config->value to text (to allow longer info) --- diff --git a/lib/db/mysql.php b/lib/db/mysql.php index c125bd375a..1fe42506f7 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 0682cafa4b..b875ebf4c2 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 3885f16114..5470e3e24e 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 efe274a7ef..ba5c44e844 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 7fd5b3270b..be3924d3d2 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