add ->{original}{default_value} when rewriting to current_timestamp
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / DB2.pm
index 886a45b..2d36a15 100644 (file)
@@ -130,9 +130,12 @@ sub _columns_info_for {
             $info->{is_auto_increment} = 1;
         }
 
-        if (eval { lc ${ $info->{default_value} } }||'' eq 'current timestamp') {
-            ${ $info->{default_value} } = 'CURRENT_TIMESTAMP';
+        if ((eval { lc ${ $info->{default_value} } }||'') eq 'current timestamp') {
+            ${ $info->{default_value} } = 'current_timestamp';
             delete $info->{size};
+
+            my $orig_deflt = 'current timestamp';
+            $info->{original}{default_value} = \$orig_deflt;
         }
     }