From: willcast Date: Sun, 21 Sep 2003 23:40:00 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=615453c9c588d102e7c1e92e530681053e59e1ce;p=moodle.git *** empty log message *** --- diff --git a/mod/glossary/db/mysql.php b/mod/glossary/db/mysql.php index 63da55218d..fdf5f753ee 100644 --- a/mod/glossary/db/mysql.php +++ b/mod/glossary/db/mysql.php @@ -55,9 +55,10 @@ function glossary_upgrade($oldversion) { execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` CHANGE `categoryid` `categoryid` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL "); } - if ( $oldversion < 2003092101 ) { - execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` ADD `ID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST"); - } + if ( $oldversion < 2003092102 ) { + execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` DROP PRIMARY KEY "); + execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` ADD `ID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST"); + } return true; } diff --git a/mod/glossary/db/mysql.sql b/mod/glossary/db/mysql.sql index a994ebaa1c..e6803406de 100644 --- a/mod/glossary/db/mysql.sql +++ b/mod/glossary/db/mysql.sql @@ -61,7 +61,7 @@ CREATE TABLE prefix_glossary_entries_categories ( id int(10) unsigned NOT NULL auto_increment, categoryid int(10) unsigned NOT NULL default '0', entryid int(10) unsigned NOT NULL default '0', - PRIMARY KEY (categoryid, entryid) + PRIMARY KEY (id) ) TYPE=MyISAM COMMENT='categories of each glossary entry'; # diff --git a/mod/glossary/db/postgres7.sql b/mod/glossary/db/postgres7.sql index 87f5cc75d4..24035e989e 100644 --- a/mod/glossary/db/postgres7.sql +++ b/mod/glossary/db/postgres7.sql @@ -61,7 +61,7 @@ CREATE TABLE prefix_glossary_entries_categories ( id SERIAL, categoryid int4 NOT NULL default '0', entryid int4 NOT NULL default '0', - PRIMARY KEY (categoryid, entryid) + PRIMARY KEY (id) ); # diff --git a/mod/glossary/version.php b/mod/glossary/version.php index ca79cc0acc..243607b010 100644 --- a/mod/glossary/version.php +++ b/mod/glossary/version.php @@ -5,7 +5,7 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2003092101; // The current module version (Date: YYYYMMDDXX) +$module->version = 2003092102; // The current module version (Date: YYYYMMDDXX) $module->cron = 0; // Period for cron to check this module (secs) $release = "0.3.2 development"; // User-friendly version number