Bug 78276: change name of "when" index on bugs_activity.bug_when column

Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=myk, a=myk
This commit is contained in:
mkanat%kerio.com 2005-04-14 22:49:25 +00:00
parent 10a2d98966
commit 6c47296a3c
2 changed files with 4 additions and 3 deletions

View File

@ -278,7 +278,8 @@ sub bz_setup_database {
# to a standard. We store those names here, so that they
# can be properly renamed.
my $bad_names = {
bugs_activity => ['bugs_activity_bugid_idx',
# 'when' is a possible leftover from Bugzillas before 2.8
bugs_activity => ['when', 'bugs_activity_bugid_idx',
'bugs_activity_bugwhen_idx'],
longdescs => ['longdescs_bugid_idx',
'longdescs_bugwhen_idx'],

View File

@ -90,7 +90,7 @@ sub _get_create_index_ddl {
my $sql = "CREATE ";
$sql .= "$index_type " if ($index_type eq 'UNIQUE'
|| $index_type eq 'FULLTEXT');
$sql .= "INDEX $index_name ON $table_name \(" .
$sql .= "INDEX \`$index_name\` ON $table_name \(" .
join(", ", @$index_fields) . "\)";
return($sql);
@ -107,7 +107,7 @@ sub get_alter_column_ddl {
sub get_drop_index_ddl {
my ($self, $table, $name) = @_;
return ("DROP INDEX $name ON $table");
return ("DROP INDEX \`$name\` ON $table");
}
sub get_rename_column_ddl {