Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Indexes for wiki and version bump (honoring partial freeze)

  • Loading branch information...
commit c26fdb80fb471269660a02d2db0675037b8f4713 1 parent a1c0899
mjollnir_ authored
View
9 mod/wiki/db/mysql.php
@@ -71,6 +71,15 @@ function wiki_upgrade($oldversion) {
}
}
+ if ($oldversion < 2004083124) {
+ modify_database('','ALTER TABLE prefix_wiki ADD INDEX course (course);');
+ modify_database('','ALTER TABLE prefix_wiki_entries ADD INDEX course (course);');
+ modify_database('','ALTER TABLE prefix_wiki_entries ADD INDEX userid (userid);');
+ modify_database('','ALTER TABLE prefix_wiki_entries ADD INDEX groupid (groupid);');
+ modify_database('','ALTER TABLE prefix_wiki_entries ADD INDEX wikiid (wikiid);');
+ modify_database('','ALTER TABLE prefix_wiki_entries ADD INDEX pagename (pagename);');
+ }
+
return true;
}
View
10 mod/wiki/db/mysql.sql
@@ -22,7 +22,8 @@ CREATE TABLE `prefix_wiki` (
`revertchanges` tinyint(4) NOT NULL default '1',
`initialcontent` varchar(255) default NULL,
`timemodified` int(10) NOT NULL default '0',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `course` (`course`)
) TYPE=MyISAM COMMENT='Main wiki table';
@@ -38,7 +39,12 @@ CREATE TABLE `prefix_wiki_entries` (
`userid` int(10) NOT NULL default '0',
`pagename` varchar(255) NOT NULL default '',
`timemodified` int(10) NOT NULL default '0',
- PRIMARY KEY (`id`)
+ PRIMARY KEY (`id`),
+ KEY `wikiid` (`wikiid`),
+ KEY `course` (`course`),
+ KEY `gropuid` (`groupid`),
+ KEY `userid` (`userid`),
+ KEY `pagename` (`pagename`)
) TYPE=MyISAM COMMENT='Holds entries for each wiki start instance.';
View
10 mod/wiki/db/postgres7.php
@@ -36,6 +36,16 @@ function wiki_upgrade($oldversion) {
}
}
}
+
+ if ($oldversion < 2004083124) {
+ modify_database('','CREATE INDEX prefix_wiki_course_idx ON prefix_wiki (course);');
+ modify_database('','CREATE INDEX prefix_wiki_entries_wikiid_idx ON prefix_wiki_entries (wikiid);');
+ modify_database('','CREATE INDEX prefix_wiki_entries_userid_idx ON prefix_wiki_entries (userid);');
+ modify_database('','CREATE INDEX prefix_wiki_entries_groupid_idx ON prefix_wiki_entries (groupid);');
+ modify_database('','CREATE INDEX prefix_wiki_entries_course_idx ON prefix_wiki_entries (course);');
+ modify_database('','CREATE INDEX prefix_wiki_entries_pagename_idx ON prefix_wiki_entries (pagename);');
+ }
+
return true;
}
View
7 mod/wiki/db/postgres7.sql
@@ -24,6 +24,7 @@ CREATE TABLE prefix_wiki (
timemodified INT8 NOT NULL default '0'
) ;
+CREATE INDEX prefix_wiki_course_idx ON prefix_wiki (course);
#
# Table structure for table mdl_wiki_entries
@@ -39,6 +40,12 @@ CREATE TABLE prefix_wiki_entries (
timemodified INT8 NOT NULL default '0'
) ;
+CREATE INDEX prefix_wiki_entries_wikiid_idx ON prefix_wiki_entries (wikiid);
+CREATE INDEX prefix_wiki_entries_userid_idx ON prefix_wiki_entries (userid);
+CREATE INDEX prefix_wiki_entries_groupid_idx ON prefix_wiki_entries (groupid);
+CREATE INDEX prefix_wiki_entries_course_idx ON prefix_wiki_entries (course);
+CREATE INDEX prefix_wiki_entries_pagename_idx ON prefix_wiki_entries (pagename);
+
CREATE TABLE prefix_wiki_pages (
pagename VARCHAR(160) NOT NULL,
View
2  mod/wiki/version.php
@@ -5,7 +5,7 @@
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
/////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004083123; // The current module version (Date: YYYYMMDDXX)
+$module->version = 2004083124; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2004083123; // Requires this Moodle version
$module->cron = 0; // Period for cron to check this module (secs)
Please sign in to comment.
Something went wrong with that request. Please try again.