From: stronk7 Date: Fri, 23 Jul 2004 17:37:21 +0000 (+0000) Subject: Changed glossary_alias->alias from text to varchar(255). X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ff15865f44a2c47c90d8c93e8f438b13bda22f78;p=moodle.git Changed glossary_alias->alias from text to varchar(255). Not mandatory but... See Bug 1398 (http://moodle.org/bugs/bug.php?op=show&bugid=1398) --- diff --git a/mod/glossary/db/mysql.php b/mod/glossary/db/mysql.php index ef49c95d2e..3d12b04115 100644 --- a/mod/glossary/db/mysql.php +++ b/mod/glossary/db/mysql.php @@ -270,6 +270,10 @@ function glossary_upgrade($oldversion) { } } } + + if ( $oldversion < 2004072300) { + table_column("glossary_alias", "alias", "alias", "VARCHAR", "255", "", "", "NOT NULL"); + } return true; } diff --git a/mod/glossary/db/mysql.sql b/mod/glossary/db/mysql.sql index 260d4e66e4..6fd23f6a26 100644 --- a/mod/glossary/db/mysql.sql +++ b/mod/glossary/db/mysql.sql @@ -66,7 +66,7 @@ CREATE TABLE prefix_glossary_entries ( CREATE TABLE prefix_glossary_alias ( id int(10) unsigned NOT NULL auto_increment, entryid int(10) unsigned NOT NULL default '0', - alias text NOT NULL, + alias varchar(255) NOT NULL, PRIMARY KEY (id) ) TYPE=MyISAM COMMENT='entries alias'; diff --git a/mod/glossary/db/postgres7.php b/mod/glossary/db/postgres7.php index 16693ca812..afa4ba491b 100644 --- a/mod/glossary/db/postgres7.php +++ b/mod/glossary/db/postgres7.php @@ -33,6 +33,10 @@ function glossary_upgrade($oldversion) { } } + if ( $oldversion < 2004072300) { + table_column("glossary_alias", "alias", "alias", "VARCHAR", "255", "", "", "NOT NULL"); + } + return true; } diff --git a/mod/glossary/db/postgres7.sql b/mod/glossary/db/postgres7.sql index a6e6f9788e..8d7a61f085 100644 --- a/mod/glossary/db/postgres7.sql +++ b/mod/glossary/db/postgres7.sql @@ -78,7 +78,7 @@ CREATE TABLE prefix_glossary_categories ( CREATE TABLE prefix_glossary_alias ( id SERIAL, entryid int4 NOT NULL default '0', - alias TEXT NOT NULL, + alias varchar(255) NOT NULL, PRIMARY KEY (id) ); diff --git a/mod/glossary/version.php b/mod/glossary/version.php index bda21b868b..4778508f1f 100644 --- a/mod/glossary/version.php +++ b/mod/glossary/version.php @@ -5,10 +5,10 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2004060400; // The current module version (Date: YYYYMMDDXX) +$module->version = 2004072300; // The current module version (Date: YYYYMMDDXX) $module->requires = 2004052501; // Requires this Moodle version $module->cron = 0; // Period for cron to check this module (secs) -$release = "0.5 development"; // User-friendly version number +$release = "1.4 development"; // User-friendly version number ?>