]> 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:36:25 +0000 (12:36 +0000)
committermkanat%bugzilla.org <>
Mon, 20 Nov 2006 12:36:25 +0000 (12:36 +0000)
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=bkor, a=justdave

Bugzilla/DB/Schema.pm

index da241ec74876f107076e4a23656cd81c824b692b..f4dd0a6ecbf0b536e6cd515f344649ef95484a89 100644 (file)
@@ -1377,10 +1377,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) . "\)";