X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2Fmysql.pm;h=2e227298b46c982b8c08a3cc8a1e5e92889ec1f2;hb=bc1cb85e84e6a30c75763edd478378a68009c722;hp=761515e42205711da0aef3fb3e250ecf15b8610e;hpb=be72dba7c8aa2d4872a66a6d581d353ad29a6deb;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm index 761515e..2e22729 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/mysql.pm @@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI'; use Carp::Clan qw/^DBIx::Class/; use Class::C3; -our $VERSION = '0.06001'; +our $VERSION = '0.07000'; =head1 NAME @@ -27,6 +27,16 @@ See L. =cut +sub _setup { + my $self = shift; + + $self->next::method(@_); + + if (not defined $self->preserve_case) { + $self->preserve_case(0); + } +} + sub _tables_list { my ($self, $opts) = @_; @@ -55,10 +65,10 @@ sub _table_fk_info { my $f_table = shift @reldata; my $f_cols = shift @reldata; - my @cols = map { s/(?: \Q$self->{_quoter}\E | $qt )//x; lc $_ } + my @cols = map { s/(?: \Q$self->{_quoter}\E | $qt )//x; $self->_lc($_) } split(/$qt?\s*$qt?,$qt?\s*$qt?/, $cols); - my @f_cols = map { s/(?: \Q$self->{_quoter}\E | $qt )//x; lc $_ } + my @f_cols = map { s/(?: \Q$self->{_quoter}\E | $qt )//x; $self->_lc($_) } split(/$qt?\s*$qt?,$qt?\s*$qt?/, $f_cols); push(@rels, { @@ -84,7 +94,7 @@ sub _mysql_table_get_keys { while(my $row = $sth->fetchrow_hashref) { next if $row->{Non_unique}; push(@{$keydata{$row->{Key_name}}}, - [ $row->{Seq_in_index}, lc $row->{Column_name} ] + [ $row->{Seq_in_index}, $self->_lc($row->{Column_name}) ] ); } foreach my $keyname (keys %keydata) {