Merged from MOODLE_14_STABLE: Indexes for label and version bump (honoring partial freeze)
This commit is contained in:
@@ -30,9 +30,11 @@ function label_upgrade($oldversion) {
|
||||
|
||||
}
|
||||
|
||||
if ($oldversion < 2004111200) { //DROP first
|
||||
execute_sql("ALTER TABLE {$CFG->prefix}label DROP INDEX course;",false);
|
||||
|
||||
|
||||
|
||||
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');
|
||||
|
||||
@@ -30,7 +30,11 @@ function label_upgrade($oldversion) {
|
||||
|
||||
}
|
||||
|
||||
if ($oldversion < 2004111200) { //DROP first
|
||||
execute_sql("DROP INDEX {$CFG->prefix}label_course_idx;",false);
|
||||
|
||||
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 = 2004111200; // 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