From: Rafael Kitover Date: Mon, 26 Apr 2010 19:24:43 +0000 (-0400) Subject: preserve_case option now works X-Git-Tag: 0.07000~52 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eb040f78817c0cac743893bd9a252340972464f5;p=dbsrgits%2FDBIx-Class-Schema-Loader.git preserve_case option now works --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index bc949f3..33a274e 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -202,7 +202,7 @@ sub _table_pk_info { my $dbh = $self->schema->storage->dbh; - my @primary = map { lc } $dbh->primary_key('', $self->db_schema, $table); + my @primary = map { $self->_lc($_) } $dbh->primary_key('', $self->db_schema, $table); s/\Q$self->{_quoter}\E//g for @primary; return \@primary; diff --git a/t/10sqlite_common.t b/t/10sqlite_common.t index 71f9ade..03145a4 100644 --- a/t/10sqlite_common.t +++ b/t/10sqlite_common.t @@ -15,6 +15,7 @@ my $tester = dbixcsl_common_tests->new( connect_info_opts => { on_connect_do => 'PRAGMA foreign_keys = ON', }, + loader_options => { preserve_case => 1 }, data_types => { # SQLite ignores data types aside from INTEGER pks. # We just test that they roundtrip sanely. diff --git a/t/11mysql_common.t b/t/11mysql_common.t index a895fcf..48208b9 100644 --- a/t/11mysql_common.t +++ b/t/11mysql_common.t @@ -18,6 +18,7 @@ my $tester = dbixcsl_common_tests->new( user => $user, password => $password, connect_info_opts=> { on_connect_call => 'set_strict_mode' }, + loader_options => { preserve_case => 1 }, skip_rels => $test_innodb ? 0 : $skip_rels_msg, no_inline_rels => 1, no_implicit_rels => 1,