From 190493a53426b2fdc7c589ea144af6515b94b06b Mon Sep 17 00:00:00 2001 From: "mkanat%kerio.com" <> Date: Thu, 10 Mar 2005 16:04:53 +0000 Subject: Bug 285443: Schema::Pg should remove FULLTEXT attribute from indexes Patch By Ed Sabol r=mkanat, a=justdave --- Bugzilla/DB/Schema/Pg.pm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Bugzilla/DB/Schema/Pg.pm b/Bugzilla/DB/Schema/Pg.pm index 23806aed1..c5b229278 100644 --- a/Bugzilla/DB/Schema/Pg.pm +++ b/Bugzilla/DB/Schema/Pg.pm @@ -39,6 +39,22 @@ sub _initialize { $self = $self->SUPER::_initialize; + # Remove FULLTEXT index types from the schemas. + foreach my $table (keys %{ $self->{schema} }) { + if ($self->{schema}{$table}{INDEXES}) { + foreach my $index (@{ $self->{schema}{$table}{INDEXES} }) { + if (ref($index) eq 'HASH') { + delete($index->{TYPE}) if ($index->{TYPE} eq 'FULLTEXT'); + } + } + foreach my $index (@{ $self->{abstract_schema}{$table}{INDEXES} }) { + if (ref($index) eq 'HASH') { + delete($index->{TYPE}) if ($index->{TYPE} eq 'FULLTEXT'); + } + } + } + } + $self->{db_specific} = { BOOLEAN => 'smallint', -- cgit v1.2.3-24-g4f1b