added preserve_case option
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / DB2.pm
index b6963be..886a45b 100644 (file)
@@ -9,7 +9,7 @@ use base qw/
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.06001';
+our $VERSION = '0.07000';
 
 =head1 NAME
 
@@ -37,6 +37,10 @@ sub _setup {
 
     my $dbh = $self->schema->storage->dbh;
     $self->{db_schema} ||= $dbh->selectrow_array('VALUES(CURRENT_USER)', {});
+
+    if (not defined $self->preserve_case) {
+        $self->preserve_case(0);
+    }
 }
 
 sub _table_uniq_info {
@@ -126,7 +130,7 @@ sub _columns_info_for {
             $info->{is_auto_increment} = 1;
         }
 
-        if (eval { lc ${ $info->{default_value} } }||'' eq 'CURRENT TIMESTAMP') {
+        if (eval { lc ${ $info->{default_value} } }||'' eq 'current timestamp') {
             ${ $info->{default_value} } = 'CURRENT_TIMESTAMP';
             delete $info->{size};
         }