preliminary Informix support
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / SQLAnywhere.pm
index bf1a336..8cf364d 100644 (file)
@@ -9,7 +9,7 @@ use base qw/
 /;
 use Carp::Clan qw/^DBIx::Class/;
 
-our $VERSION = '0.06000';
+our $VERSION = '0.07000';
 
 =head1 NAME
 
@@ -18,15 +18,21 @@ SQL Anywhere Implementation.
 
 =head1 DESCRIPTION
 
-See L<DBIx::Class::Schema::Loader::Base>.
+See L<DBIx::Class::Schema::Loader> and L<DBIx::Class::Schema::Loader::Base>.
 
 =cut
 
 sub _setup {
     my $self = shift;
 
+    $self->next::method(@_);
+
     $self->{db_schema} ||=
         ($self->schema->storage->dbh->selectrow_array('select user'))[0];
+
+    if (not defined $self->preserve_case) {
+        $self->preserve_case(0);
+    }
 }
 
 sub _tables_list {
@@ -99,6 +105,10 @@ EOF
         }
 
         delete $info->{default_value} if ref($info->{default_value}) eq 'SCALAR' && ${ $info->{default_value} } eq 'NULL';
+
+        if (eval { lc ${ $info->{default_value} } }||'' eq 'current timestamp') {
+            ${ $info->{default_value} } = 'CURRENT_TIMESTAMP';
+        }
     }
 
     return $result;