From 9788cc64ee8014f670e0d34c853b86c82693c9ec Mon Sep 17 00:00:00 2001 From: Aleksi Kinnunen <721951+Sopsy@users.noreply.github.com> Date: Fri, 28 Aug 2020 09:24:36 +0000 Subject: [PATCH] Add MySQL unsigned int casting rules (#1200) Fixes dimitri/pgloader#1186 --- src/sources/mysql/mysql-cast-rules.lisp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/sources/mysql/mysql-cast-rules.lisp b/src/sources/mysql/mysql-cast-rules.lisp index 6cb27f9..614fc62 100644 --- a/src/sources/mysql/mysql-cast-rules.lisp +++ b/src/sources/mysql/mysql-cast-rules.lisp @@ -64,7 +64,12 @@ :target (:type "integer" :drop-typemod t)) (:source (:type "integer" :unsigned t) :target (:type "bigint" :drop-typemod t)) - + (:source (:type "int" :unsigned t) + :target (:type "bigint" :drop-typemod t)) + + (:source (:type "int" :unsigned t :auto-increment t) + :target (:type "bigserial" :drop-typemod t)) + ;; we need the following to benefit from :drop-typemod (:source (:type "tinyint") :target (:type "smallint" :drop-typemod t)) (:source (:type "smallint") :target (:type "smallint" :drop-typemod t))