From: Rafael Kitover Date: Tue, 7 Jun 2011 07:49:52 +0000 (-0400) Subject: fix uniq_to_primary test on DB2 and SQLAnywhere X-Git-Tag: 0.07011~83 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=13904b0959ef572ea1c0388726101d5e32724dcf;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix uniq_to_primary test on DB2 and SQLAnywhere --- diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index f15f949..b99e05d 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -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} }, );