Merged from MOODLE_14_STABLE: Indexes for label and version bump (honoring partial freeze)

This commit is contained in:
mjollnir_
2004-11-19 03:05:38 +00:00
parent a177631062
commit 6513df237c
5 changed files with 13 additions and 4 deletions
+4 -2
View File
@@ -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;
+2 -1
View File
@@ -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');
+4
View File
@@ -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;
+2
View File
@@ -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');
+1 -1
View File
@@ -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)