X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FSQLAnywhere.pm;h=9fe3857bbf4356ced6e87bfd400ba06d35637061;hb=c819561ab07117cbe62d10cd64988ca811ad9149;hp=f2a12cee597228eea825c2a223f57f8a60aa2d83;hpb=b45a0999ad7b944b6371a0055c103ccfaa01d75c;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm b/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm index f2a12ce..9fe3857 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/SQLAnywhere.pm @@ -2,16 +2,13 @@ package DBIx::Class::Schema::Loader::DBI::SQLAnywhere; use strict; use warnings; -use base qw/ - DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault - DBIx::Class::Schema::Loader::DBI -/; +use base 'DBIx::Class::Schema::Loader::DBI::Component::QuotedDefault'; use mro 'c3'; use List::MoreUtils 'any'; use namespace::clean; use DBIx::Class::Schema::Loader::Table (); -our $VERSION = '0.07017'; +our $VERSION = '0.07024'; =head1 NAME @@ -94,7 +91,7 @@ sub _columns_info_for { $info->{is_auto_increment} = 1; } - my ($user_type) = $dbh->selectrow_array(<<'EOF', {}, $table->schema, $table->name, $col); + my ($user_type) = $dbh->selectrow_array(<<'EOF', {}, $table->schema, $table->name, lc($col)); SELECT ut.type_name FROM systabcol tc JOIN systab t @@ -103,7 +100,7 @@ JOIN sysuser u ON t.creator = u.user_id JOIN sysusertype ut ON tc.user_type = ut.type_id -WHERE u.user_name = ? AND t.table_name = ? AND tc.column_name = ? +WHERE u.user_name = ? AND t.table_name = ? AND lower(tc.column_name) = ? EOF $info->{data_type} = $user_type if defined $user_type; @@ -125,9 +122,9 @@ JOIN systab t ON t.table_id = tc.table_id JOIN sysuser u ON t.creator = u.user_id -WHERE u.user_name = ? AND t.table_name = ? AND tc.column_name = ? +WHERE u.user_name = ? AND t.table_name = ? AND lower(tc.column_name) = ? EOF - $sth->execute($table->schema, $table->name, $col); + $sth->execute($table->schema, $table->name, lc($col)); my ($width, $scale) = $sth->fetchrow_array; $sth->finish;