From 6a660fcf76edb1ea60c2fa621781942ff48f6c3b Mon Sep 17 00:00:00 2001 From: Aliaksei Urbanski Date: Fri, 10 Jul 2015 15:34:26 +0000 Subject: [PATCH] Default cast rules for MySQL's datatime types fixed [issue #252] --- src/sources/mysql/mysql-cast-rules.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sources/mysql/mysql-cast-rules.lisp b/src/sources/mysql/mysql-cast-rules.lisp index f4badeb..e465c25 100644 --- a/src/sources/mysql/mysql-cast-rules.lisp +++ b/src/sources/mysql/mysql-cast-rules.lisp @@ -136,8 +136,8 @@ ;; date types without strange defaults (:source (:type "date") :target (:type "date")) - (:source (:type "datetime") :target (:type "timestamptz")) - (:source (:type "timestamp") :target (:type "timestamptz")) + (:source (:type "datetime") :target (:type "timestamptz") :using pgloader.transforms::zero-dates-to-null) + (:source (:type "timestamp") :target (:type "timestamptz") :using pgloader.transforms::zero-dates-to-null) (:source (:type "year") :target (:type "integer" :drop-typemod t)) ;; Inline MySQL "interesting" datatype