From 90dea2ad4e33ff021a774655160100a274111e5b Mon Sep 17 00:00:00 2001 From: padinko <2padi2@gmail.com> Date: Thu, 22 Sep 2022 13:11:34 +0200 Subject: [PATCH] Fix mapping mysql signed int with auto_incement to postgresql serial (#1248) (#1437) --- src/sources/mysql/mysql-cast-rules.lisp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sources/mysql/mysql-cast-rules.lisp b/src/sources/mysql/mysql-cast-rules.lisp index 614fc62..fd939a5 100644 --- a/src/sources/mysql/mysql-cast-rules.lisp +++ b/src/sources/mysql/mysql-cast-rules.lisp @@ -66,10 +66,12 @@ :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)) - + (:source (:type "int" :signed t :auto-increment t) + :target (:type "serial" :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))