Skip to content

Commit 90dea2a

Browse files
authored
Fix mapping mysql signed int with auto_incement to postgresql serial (#1248) (#1437)
1 parent f25f1b6 commit 90dea2a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sources/mysql/mysql-cast-rules.lisp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,12 @@
6666
:target (:type "bigint" :drop-typemod t))
6767
(:source (:type "int" :unsigned t)
6868
:target (:type "bigint" :drop-typemod t))
69-
69+
7070
(:source (:type "int" :unsigned t :auto-increment t)
7171
:target (:type "bigserial" :drop-typemod t))
72-
72+
(:source (:type "int" :signed t :auto-increment t)
73+
:target (:type "serial" :drop-typemod t))
74+
7375
;; we need the following to benefit from :drop-typemod
7476
(:source (:type "tinyint") :target (:type "smallint" :drop-typemod t))
7577
(:source (:type "smallint") :target (:type "smallint" :drop-typemod t))

0 commit comments

Comments
 (0)