release 0.07024
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / SQLAnywhere.pm
index 6fb6ca5..9fe3857 100644 (file)
@@ -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.07014';
+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;