fix defaults broken by last Pg defaults fix commit
Rafael Kitover [Tue, 6 Sep 2011 07:44:10 +0000 (03:44 -0400)]
lib/DBIx/Class/Schema/Loader/DBI/Component/QuotedDefault.pm

index 223b044..ecfd87b 100644 (file)
@@ -38,7 +38,7 @@ sub _columns_info_for {
             elsif ($def =~ /^\((-?\d.*?)\)(?:::[\w\s]+)?\z/) {
                 $info->{default_value} = $1;
             }
-            elsif ($def =~ /^(\d.*?)(?:::[\w\s]+)?\z/) {
+            elsif ($def =~ /^(-?\d.*?)(?:::[\w\s]+)?\z/) {
                 $info->{default_value} = $1;
             }
             elsif ($def =~ /^NULL:?/i) {