From 314ee9611a39f4a9f1f8786b5620a1bf7a8285db Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 6 Oct 2013 12:04:23 +0200 Subject: [PATCH] Fix MySQL default cast rules to include bigint auto_increment to bigserial. --- mysql-cast-rules.lisp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mysql-cast-rules.lisp b/mysql-cast-rules.lisp index 190fb41..52f85e0 100644 --- a/mysql-cast-rules.lisp +++ b/mysql-cast-rules.lisp @@ -64,6 +64,9 @@ (:source (:type "int" :auto-increment nil :typemod (<= 10 (car typemod))) :target (:type "bigint")) + ;; bigint with auto_increment always are bigserial + (:source (:type "bigint" :auto-increment t) :target (:type "bigserial")) + ;; we need the following to benefit from :drop-typemod (:source (:type "tinyint") :target (:type "integer")) (:source (:type "smallint") :target (:type "integer"))