Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

*** empty log message ***

  • Loading branch information...
commit 615453c9c588d102e7c1e92e530681053e59e1ce 1 parent 71009e4
authored
7  mod/glossary/db/mysql.php
@@ -55,9 +55,10 @@ function glossary_upgrade($oldversion) {
55 55
           execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` CHANGE `categoryid` `categoryid` INT( 10 ) UNSIGNED DEFAULT '0' NOT NULL ");
56 56
      }
57 57
 
58  
-     if ( $oldversion < 2003092101 ) {
59  
-          execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` ADD `ID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
60  
-     }
  58
+    if ( $oldversion < 2003092102 ) {
  59
+        execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` DROP PRIMARY KEY ");
  60
+        execute_sql("ALTER TABLE `{$CFG->prefix}glossary_entries_categories` ADD `ID` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST");
  61
+    }
61 62
 
62 63
     return true;
63 64
 }
2  mod/glossary/db/mysql.sql
@@ -61,7 +61,7 @@ CREATE TABLE prefix_glossary_entries_categories (
61 61
      id int(10) unsigned NOT NULL auto_increment,
62 62
      categoryid int(10) unsigned NOT NULL default '0',
63 63
      entryid int(10) unsigned NOT NULL default '0',
64  
-     PRIMARY KEY  (categoryid, entryid)
  64
+     PRIMARY KEY  (id)
65 65
 ) TYPE=MyISAM COMMENT='categories of each glossary entry';
66 66
 
67 67
 #
2  mod/glossary/db/postgres7.sql
@@ -61,7 +61,7 @@ CREATE TABLE prefix_glossary_entries_categories (
61 61
      id SERIAL,
62 62
      categoryid int4 NOT NULL default '0',
63 63
      entryid int4 NOT NULL default '0',
64  
-     PRIMARY KEY  (categoryid, entryid)
  64
+     PRIMARY KEY  (id)
65 65
 );
66 66
 
67 67
 #
2  mod/glossary/version.php
@@ -5,7 +5,7 @@
5 5
 ///  This fragment is called by moodle_needs_upgrading() and /admin/index.php
6 6
 /////////////////////////////////////////////////////////////////////////////////
7 7
 
8  
-$module->version  = 2003092101;  // The current module version (Date: YYYYMMDDXX)
  8
+$module->version  = 2003092102;  // The current module version (Date: YYYYMMDDXX)
9 9
 $module->cron     = 0;           // Period for cron to check this module (secs)
10 10
 
11 11
 $release = "0.3.2 development";   // User-friendly version number

0 notes on commit 615453c

Please sign in to comment.
Something went wrong with that request. Please try again.