X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FSybase.pm;h=99d6a4e21aa8e51ce4aaa94e2a8306da0cad965b;hb=41968729ce9a8812e3d3ae80adbd79a85b04551b;hp=d240cc8aee60ff1bb7b7b0b3ddac7e59d70cee58;hpb=c5ff1f26b1537e8184313cb6d05f86c4a31fd3b8;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm b/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm index d240cc8..99d6a4e 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Sybase.pm @@ -251,7 +251,11 @@ WHERE o.name = @{[ $dbh->quote($table) ]} AND o.type = 'U' my $info = $sth->fetchall_hashref('name'); while (my ($col, $res) = each %$result) { - $res->{data_type} = $info->{$col}{type}; + my $data_type = $res->{data_type} = $info->{$col}{type}; + + if ($data_type && $data_type =~ /^timestamp\z/i) { + $res->{inflate_datetime} = 0; + } if (my $default = $info->{$col}{deflt}) { if ($default =~ /^AS \s+ (\S+)/ix) { @@ -259,7 +263,7 @@ WHERE o.name = @{[ $dbh->quote($table) ]} AND o.type = 'U' $res->{default_value} = \$function; } elsif ($default =~ /^DEFAULT \s+ (\S+)/ix) { - my ($constant_default) = $1 =~ /^['"\[\]]?(.*?)['"\[\]]\z/; + my ($constant_default) = $1 =~ /^['"\[\]]?(.*?)['"\[\]]?\z/; $res->{default_value} = $constant_default; } }