]> git.mjollnir.org Git - moodle.git/commitdiff
*** empty log message ***
authorwillcast <willcast>
Sun, 21 Sep 2003 23:40:00 +0000 (23:40 +0000)
committerwillcast <willcast>
Sun, 21 Sep 2003 23:40:00 +0000 (23:40 +0000)
mod/glossary/db/mysql.php
mod/glossary/db/mysql.sql
mod/glossary/db/postgres7.sql
mod/glossary/version.php

index 63da55218d3b1fe79ace656a30c53a9f3bc37237..fdf5f753eefdc9b78b4c586c33f8ebc706c845fe 100644 (file)
@@ -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;
 }
index a994ebaa1c589cb546ba730b49de341468f4d931..e6803406dec46cc38a1c948c52e55654d2bb7c76 100644 (file)
@@ -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';
 
 #
index 87f5cc75d4d02fdbf575c85fea196849298d0cce..24035e989e058b87a5f3881bcb0eafa45828a26c 100644 (file)
@@ -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)
 );
 
 #
index ca79cc0accc2b837114e2abd46b9d93c39371f24..243607b010d546847be84e2ab976496364df93cc 100644 (file)
@@ -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