Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
58d1270a
Commit
58d1270a
authored
Sep 07, 2006
by
Neil Drumm
Browse files
#73045
by jhenry and davemicc. Add an index to {file_revisions} for faster queries.
parent
72a19d00
Changes
1
Hide whitespace changes
Inline
Side-by-side
modules/system/system.install
View file @
58d1270a
...
...
@@ -243,7 +243,8 @@ function system_install() {
vid int unsigned NOT NULL default 0,
description varchar(255) NOT NULL default '',
list tinyint unsigned NOT NULL default 0,
PRIMARY KEY (fid, vid)
PRIMARY KEY (fid, vid),
KEY (vid)
) /*!40100 DEFAULT CHARACTER SET UTF8 */ ");
db_query("CREATE TABLE {filter_formats} (
...
...
@@ -674,6 +675,7 @@ function system_install() {
list smallint_unsigned NOT NULL default 0,
PRIMARY KEY (fid, vid)
)");
db_query("CREATE INDEX file_revisions_vid_idx ON file_revisions(vid)");
db_query("CREATE TABLE {filter_formats} (
format serial,
...
...
@@ -3367,6 +3369,20 @@ function system_update_1011() {
return $ret;
}
function system_update_1012() {
$ret = array();
switch ($GLOBALS['db_type']) {
case 'mysql':
case 'mysqli':
$ret[] = update_sql("ALTER TABLE {file_revisions} ADD INDEX(vid)");
break;
case 'pgsql':
$ret[] = update_sql('CREATE INDEX {file_revisions}_vid_idx ON {file_revisions}(vid)');
break;
}
return $ret;
}
/**
* @} End of "defgroup updates-4.7-to-x.x"
* The next series of updates should start at 2000.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment