}
}
+#####################################################################
+# Custom Database Setup
+#####################################################################
+
+sub bz_setup_database {
+ my $self = shift;
+ $self->SUPER::bz_setup_database(@_);
+
+ # PostgreSQL doesn't like having *any* index on the thetext
+ # field, because it can't have index data longer than 2770
+ # characters on that field.
+ $self->bz_drop_index('longdescs', 'longdescs_thetext_idx');
+}
+
1;
$dbh->bz_add_index('bugs', 'bugs_short_desc_idx',
{TYPE => 'FULLTEXT', FIELDS => [qw(short_desc)]});
}
-if (!$dbh->bz_index_info('longdescs', 'longdescs_thetext_idx')) {
+# Right now, we only create the "thetext" index on MySQL.
+if ($dbh->isa('Bugzilla::DB::Mysql')
+ && !$dbh->bz_index_info('longdescs', 'longdescs_thetext_idx'))
+{
print "Adding full-text index for thetext column in longdescs table...\n";
$dbh->bz_add_index('longdescs', 'longdescs_thetext_idx',
{TYPE => 'FULLTEXT', FIELDS => [qw(thetext)]});