changing tags->text to varchar 20, created index on tags(type, userid), and tags(text)
This commit is contained in:
+8
-1
@@ -1828,7 +1828,14 @@ function main_upgrade($oldversion=0) {
|
||||
}
|
||||
}
|
||||
|
||||
// change tags->type to varchar(20), adding 2 indexes for tags table.
|
||||
if ($oldversion < 2006042401) {
|
||||
table_column('tags','type','type','varchar','20','','','not null');
|
||||
modify_database('',"ALTER TABLE prefix_tags ADD INDEX tags_typeuserid_idx (type(20), userid)");
|
||||
modify_database('',"ALTER TABLE prefix_tags ADD INDEX tags_text(text(255))");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
+3
-1
@@ -878,7 +878,9 @@ CREATE TABLE prefix_tags (
|
||||
`id` int(10) NOT NULL auto_increment,
|
||||
`type` varchar(255) NOT NULL default 'official',
|
||||
`userid` int(10) NOT NULL default '0',
|
||||
`text` varchar(255) NOT NULL default '',
|
||||
`text` varchar(20) NOT NULL default '',
|
||||
KEY `tags_typeuserid_idx` (`type`, `userid`),
|
||||
KEY `tags_text` (`text`);
|
||||
PRIMARY KEY (`id`)
|
||||
) TYPE=MyISAM COMMENT ='tags structure for moodle.';
|
||||
|
||||
|
||||
@@ -1523,6 +1523,12 @@ function main_upgrade($oldversion=0) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add 2 indexes to tags table
|
||||
if ($oldversion < 2006042401) {
|
||||
modify_database('',"CREATE INDEX tags_typeuserid_idx ON prefix_tags (type, userid);");
|
||||
modify_database('',"CREATE INDEX tags_text_idx ON prefix_tags (text);");
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
@@ -655,6 +655,8 @@ CREATE TABLE prefix_tags (
|
||||
userid INTEGER NOT NULL default 0,
|
||||
text varchar(255) NOT NULL default ''
|
||||
);
|
||||
CREATE INDEX tags_typeuserid_idx ON prefix_tags (type, userid);
|
||||
CREATE INDEX tags_text_idx ON prefix_tags (text);
|
||||
|
||||
CREATE TABLE prefix_blog_tag_instance (
|
||||
id SERIAL PRIMARY KEY,
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
// This is compared against the values stored in the database to determine
|
||||
// whether upgrades should be performed (see lib/db/*.php)
|
||||
|
||||
$version = 2006042400; // YYYYMMDD = date
|
||||
$version = 2006042401; // YYYYMMDD = date
|
||||
// XY = increments within a single day
|
||||
|
||||
$release = '1.6 Beta 3'; // Human-friendly version name
|
||||
|
||||
Reference in New Issue
Block a user