From 71009e400de409211fff37c58818e2a649d3b1c7 Mon Sep 17 00:00:00 2001 From: willcast Date: Sun, 21 Sep 2003 23:34:21 +0000 Subject: [PATCH] *** empty log message *** --- mod/glossary/db/mysql.php | 4 ++++ mod/glossary/db/mysql.sql | 1 + mod/glossary/db/postgres7.sql | 1 + mod/glossary/version.php | 4 ++-- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mod/glossary/db/mysql.php b/mod/glossary/db/mysql.php index 2fcaae6ba7..63da55218d 100644 --- a/mod/glossary/db/mysql.php +++ b/mod/glossary/db/mysql.php @@ -55,6 +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"); + } + return true; } diff --git a/mod/glossary/db/mysql.sql b/mod/glossary/db/mysql.sql index c72df48210..a994ebaa1c 100644 --- a/mod/glossary/db/mysql.sql +++ b/mod/glossary/db/mysql.sql @@ -58,6 +58,7 @@ CREATE TABLE prefix_glossary_categories ( # 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) diff --git a/mod/glossary/db/postgres7.sql b/mod/glossary/db/postgres7.sql index 92fc5cf5c7..87f5cc75d4 100644 --- a/mod/glossary/db/postgres7.sql +++ b/mod/glossary/db/postgres7.sql @@ -58,6 +58,7 @@ CREATE TABLE prefix_glossary_categories ( # CREATE TABLE prefix_glossary_entries_categories ( + id SERIAL, categoryid int4 NOT NULL default '0', entryid int4 NOT NULL default '0', PRIMARY KEY (categoryid, entryid) diff --git a/mod/glossary/version.php b/mod/glossary/version.php index aaf3e9b12b..ca79cc0acc 100644 --- a/mod/glossary/version.php +++ b/mod/glossary/version.php @@ -5,9 +5,9 @@ /// This fragment is called by moodle_needs_upgrading() and /admin/index.php ///////////////////////////////////////////////////////////////////////////////// -$module->version = 2003092100; // The current module version (Date: YYYYMMDDXX) +$module->version = 2003092101; // The current module version (Date: YYYYMMDDXX) $module->cron = 0; // Period for cron to check this module (secs) -$release = "0.3.1 development"; // User-friendly version number +$release = "0.3.2 development"; // User-friendly version number ?> -- 2.39.5