Permalink
Browse files

Indexes for resource and version bump (honoring partial freeze)

  • Loading branch information...
1 parent 6ddc682 commit a4f2ce69464b7fc689b977a4a273dcda4db690f8 mjollnir_ committed Nov 19, 2004
@@ -53,6 +53,10 @@ function resource_upgrade($oldversion) {
rebuild_course_cache();
}
+ if ($oldversion < 2004083124) {
+ modify_database('','ALTER TABLE prefix_resource ADD INDEX course (course);');
+ }
+
return true;
}
@@ -26,7 +26,8 @@ CREATE TABLE prefix_resource (
options varchar(255) NOT NULL default '',
timemodified int(10) unsigned NOT NULL default '0',
PRIMARY KEY (id),
- UNIQUE KEY id (id)
+ UNIQUE KEY id (id),
+ KEY `course` (`course`)
) TYPE=MyISAM;
@@ -49,6 +49,10 @@ function resource_upgrade($oldversion) {
rebuild_course_cache();
}
+ if ($oldversion < 2004083124) {
+ modify_database('','CREATE INDEX prefix_resource_course_idx ON prefix_resource (course);');
+ }
+
return true;
}
@@ -27,6 +27,7 @@ CREATE TABLE prefix_resource (
timemodified integer NOT NULL default '0'
);
+CREATE INDEX prefix_resource_course_idx ON prefix_resource (course);
#
# Dumping data for table `log_display`
View
@@ -5,7 +5,7 @@
// This fragment is called by /admin/index.php
////////////////////////////////////////////////////////////////////////////////
-$module->version = 2004083123;
+$module->version = 2004083124;
$module->requires = 2004083123; // Requires this Moodle version
$module->cron = 0;

0 comments on commit a4f2ce6

Please sign in to comment.