release 0.07007
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / mysql.pm
index 83a9387..2a711fa 100644 (file)
@@ -6,7 +6,7 @@ use base 'DBIx::Class::Schema::Loader::DBI';
 use Carp::Clan qw/^DBIx::Class/;
 use mro 'c3';
 
-our $VERSION = '0.07002';
+our $VERSION = '0.07007';
 
 =head1 NAME
 
@@ -177,7 +177,9 @@ EOF
             }
         }
         elsif ($info->{data_type} =~ /^(?:date(?:time)?|timestamp)\z/) {
-            $info->{datetime_undef_if_invalid} = 1;
+            if (not (defined $self->datetime_undef_if_invalid && $self->datetime_undef_if_invalid == 0)) {
+                $info->{datetime_undef_if_invalid} = 1;
+            }
         }
 
         # Sometimes apparently there's a bug where default_value gets set to ''