diff --git a/src/sources/mysql/mysql-cast-rules.lisp b/src/sources/mysql/mysql-cast-rules.lisp index e81c48f..00c9bd2 100644 --- a/src/sources/mysql/mysql-cast-rules.lisp +++ b/src/sources/mysql/mysql-cast-rules.lisp @@ -135,6 +135,10 @@ :using pgloader.transforms::set-to-enum-array) ;; geometric data types, just POINT for now + (:source (:type "geometry") + :target (:type "point") + :using pgloader.transforms::convert-mysql-point) + (:source (:type "point") :target (:type "point") :using pgloader.transforms::convert-mysql-point)) diff --git a/src/sources/mysql/mysql-schema.lisp b/src/sources/mysql/mysql-schema.lisp index 223cc40..ca40283 100644 --- a/src/sources/mysql/mysql-schema.lisp +++ b/src/sources/mysql/mysql-schema.lisp @@ -398,8 +398,9 @@ order by table_name, ordinal_position" Mostly we just use the name, but in case of POINT we need to use astext(name)." (case (intern (string-upcase type) "KEYWORD") - (:point (format nil "astext(`~a`) as `~a`" name name)) - (t (format nil "`~a`" name)))) + (:geometry (format nil "astext(`~a`) as `~a`" name name)) + (:point (format nil "astext(`~a`) as `~a`" name name)) + (t (format nil "`~a`" name)))) (defun get-column-list (dbname table-name) "Some MySQL datatypes have a meaningless default output representation, we