From: Rafael Kitover Date: Wed, 14 Apr 2010 15:12:57 +0000 (-0400) Subject: fix sybase tests for new columns X-Git-Tag: 0.07000~64 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c9486c7888334bfe6e2f3a4ea5ef7730f8e6696e;hp=1e4730815c9321bd2381dd7db176ee496f84a8d4;p=dbsrgits%2FDBIx-Class-Schema-Loader.git fix sybase tests for new columns --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 74b777e..430c9ab 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -1418,7 +1418,7 @@ sub _resolve_col_accessor_collisions { while (my ($col, $info) = each %$col_info) { my $accessor = $info->{accessor} || $col; - next if $accessor eq 'id'; # XXX fix this in DBIC + next if $accessor eq 'id'; # special case (very common column) if (exists $methods{$accessor}) { $info->{accessor} = undef; @@ -1452,7 +1452,9 @@ sub _setup_src_meta { $col_info->{$col}{accessor} = lc $col if $col ne lc($col); } - } else { + } + else { + # XXX this needs to go away $col_info = { map { lc($_), $col_info->{$_} } keys %$col_info }; } diff --git a/t/lib/dbixcsl_common_tests.pm b/t/lib/dbixcsl_common_tests.pm index c4e750f..676e58e 100644 --- a/t/lib/dbixcsl_common_tests.pm +++ b/t/lib/dbixcsl_common_tests.pm @@ -1052,8 +1052,8 @@ sub create { id $self->{auto_inc_pk}, dat VARCHAR(32) NOT NULL, dat2 VARCHAR(32) NOT NULL, - set_primary_key INTEGER, - dbix_class_testcomponent INTEGER, + set_primary_key INTEGER $self->{null}, + dbix_class_testcomponent INTEGER $self->{null}, UNIQUE (dat2, dat) ) $self->{innodb} },