Indexes for label and version bump (honoring partial freeze)
This commit is contained in:
@@ -15,6 +15,9 @@ function label_upgrade($oldversion) {
|
||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");
|
||||
}
|
||||
|
||||
if ($oldversion < 2004060401) {
|
||||
modify_database('','ALTER TABLE prefix_label ADD INDEX course (course);');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ CREATE TABLE `prefix_label` (
|
||||
`name` varchar(255) NOT NULL default '',
|
||||
`content` text NOT NULL,
|
||||
`timemodified` int(10) unsigned NOT NULL default '0',
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`),
|
||||
KEY course (course)
|
||||
) COMMENT='Defines labels';
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');
|
||||
|
||||
@@ -14,6 +14,10 @@ function label_upgrade($oldversion) {
|
||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');");
|
||||
modify_database("", "INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');");
|
||||
}
|
||||
|
||||
if ($oldversion < 2004060401) {
|
||||
modify_database('','CREATE INDEX prefix_label_course_idx ON prefix_label (course);');
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -6,5 +6,7 @@ CREATE TABLE prefix_label (
|
||||
timemodified integer NOT NULL default '0'
|
||||
);
|
||||
|
||||
CREATE INDEX prefix_label_course_idx ON prefix_label (course);
|
||||
|
||||
INSERT INTO prefix_log_display VALUES ('label', 'add', 'quiz', 'name');
|
||||
INSERT INTO prefix_log_display VALUES ('label', 'update', 'quiz', 'name');
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2004060400; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->version = 2004060401; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->requires = 2004052505; // Requires this Moodle version
|
||||
$module->cron = 0; // Period for cron to check this module (secs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user