fix uniq_to_primary test on DB2 and SQLAnywhere
Rafael Kitover [Tue, 7 Jun 2011 07:49:52 +0000 (03:49 -0400)]
t/lib/dbixcsl_common_tests.pm

index f15f949..b99e05d 100644 (file)
@@ -1435,10 +1435,12 @@ sub create {
                 id INTEGER NOT NULL UNIQUE,
                 id1 INTEGER NOT NULL,
                 id2 INTEGER NOT NULL,
-                id3 INTEGER $self->{null},
-                id4 INTEGER NOT NULL,
-                UNIQUE (id1, id2),
-                UNIQUE (id3, id4)
+                @{[ $self->{vendor} !~ /^(?:DB2|SQLAnywhere)\z/i ? "
+                    id3 INTEGER $self->{null},
+                    id4 INTEGER NOT NULL,
+                    UNIQUE (id3, id4),
+                " : '' ]}
+                    UNIQUE (id1, id2)
             ) $self->{innodb}
         },
     );