bump $VERSION
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / Component / QuotedDefault.pm
index fed806d..5dd5884 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use warnings;
 use Class::C3;
 
-our $VERSION = '0.05001';
+our $VERSION = '0.07001';
 
 =head1 NAME
 
@@ -35,7 +35,8 @@ sub _columns_info_for {
                 $info->{default_value} = $1;
             }
             else {
-                $info->{default_value} = $def =~ /^\d/ ? $def : \$def;
+                # Some DBs (eg. Pg) put brackets around negative number defaults
+                $info->{default_value} = $def =~ /^\(?(-?\d.*?)\)?$/ ? $1 : \$def;
             }
         }
     }