preserve_case option now works
Rafael Kitover [Mon, 26 Apr 2010 19:24:43 +0000 (15:24 -0400)]
lib/DBIx/Class/Schema/Loader/DBI.pm
t/10sqlite_common.t
t/11mysql_common.t

index bc949f3..33a274e 100644 (file)
@@ -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;
index 71f9ade..03145a4 100644 (file)
@@ -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.
index a895fcf..48208b9 100644 (file)
@@ -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,