]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 361176: [PostgreSQL] Warning when creating tables for the first time
authormkanat%bugzilla.org <>
Mon, 20 Nov 2006 12:34:15 +0000 (12:34 +0000)
committermkanat%bugzilla.org <>
Mon, 20 Nov 2006 12:34:15 +0000 (12:34 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave

Bugzilla/DB/Schema.pm

index c2c884e6d59b218cd48cf481dcd9aff61a5713cd..c45419a37656bd73c9e6403b219c522a3fa556ef 100644 (file)
@@ -1488,10 +1488,10 @@ sub _get_create_index_ddl {
 
 =cut
 
-    my($self, $table_name, $index_name, $index_fields, $index_type) = @_;
+    my ($self, $table_name, $index_name, $index_fields, $index_type) = @_;
 
     my $sql = "CREATE ";
-    $sql .= "$index_type " if ($index_type eq 'UNIQUE');
+    $sql .= "$index_type " if ($index_type && $index_type eq 'UNIQUE');
     $sql .= "INDEX $index_name ON $table_name \(" .
       join(", ", @$index_fields) . "\)";