From: stronk7 Date: Tue, 26 Sep 2006 17:43:37 +0000 (+0000) Subject: Increasing log_display->field because sql_concat() (one X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=2efd67bf5f5d0a3703c2238ca187f77b8c44490e;p=moodle.git Increasing log_display->field because sql_concat() (one wrapper over ADOdb Concat() generates really long expressions for MSSQL. --- diff --git a/lib/db/install.xml b/lib/db/install.xml index ba2d3f4190..07519e4959 100644 --- a/lib/db/install.xml +++ b/lib/db/install.xml @@ -1,5 +1,5 @@ - @@ -404,7 +404,7 @@ - + diff --git a/lib/db/mysql.php b/lib/db/mysql.php index 20f4be54eb..f4a9bb7f2f 100644 --- a/lib/db/mysql.php +++ b/lib/db/mysql.php @@ -2329,6 +2329,9 @@ function main_upgrade($oldversion=0) { execute_sql("CREATE UNIQUE INDEX {$CFG->prefix}role_sor_uix ON {$CFG->prefix}role (sortorder);", false); } + if ($oldversion < 2006092601) { + table_column('log_display', 'field', 'field', 'varchar', '200', '', '', 'not null', ''); + } return $result; } diff --git a/lib/db/mysql.sql b/lib/db/mysql.sql index 06e2102652..b9f10efa6c 100644 --- a/lib/db/mysql.sql +++ b/lib/db/mysql.sql @@ -437,7 +437,7 @@ CREATE TABLE `prefix_log_display` ( `module` varchar(20) NOT NULL default '', `action` varchar(40) NOT NULL default '', `mtable` varchar(30) NOT NULL default '', - `field` varchar(50) NOT NULL default '', + `field` varchar(200) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM COMMENT='For a particular module/action, specifies a moodle table/field.'; ALTER TABLE prefix_log_display ADD UNIQUE `moduleaction`(`module` , `action`); diff --git a/lib/db/postgres7.php b/lib/db/postgres7.php index e54ab2f319..58e1c564a5 100644 --- a/lib/db/postgres7.php +++ b/lib/db/postgres7.php @@ -1954,6 +1954,9 @@ function main_upgrade($oldversion=0) { } } + if ($oldversion < 2006092601) { + table_column('log_display', 'field', 'field', 'varchar', '200', '', '', 'not null', ''); + } return $result; } diff --git a/lib/db/postgres7.sql b/lib/db/postgres7.sql index ee3f1a95ef..98bf81c4ba 100644 --- a/lib/db/postgres7.sql +++ b/lib/db/postgres7.sql @@ -276,7 +276,7 @@ CREATE TABLE prefix_log_display ( module varchar(20) NOT NULL default '', action varchar(40) NOT NULL default '', mtable varchar(30) NOT NULL default '', - field varchar(50) NOT NULL default '' + field varchar(200) NOT NULL default '' ); CREATE INDEX prefix_log_display_moduleaction ON prefix_log_display (module,action); diff --git a/version.php b/version.php index 91c90fd74e..c71a1c7f73 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ // This is compared against the values stored in the database to determine // whether upgrades should be performed (see lib/db/*.php) - $version = 2006092600; // YYYYMMDD = date + $version = 2006092601; // YYYYMMDD = date // XY = increments within a single day $release = '1.7 dev'; // Human-friendly version name