From 88bb4e0b95eb70973af5190e7a9085c57ee735d3 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Thu, 22 Oct 2015 21:55:34 +0200 Subject: [PATCH] Register "auto_increment" as a SQLite noise word. As seen in #302 it's possible to define a SQLite column of type "integer auto_increment". In my testing tho, it doesn't mean a thing. Worse than that, apparently when an integer column is created that is also used as the primary key of the table, the notation "integer auto_increment primary key" disables the rowid behavior that is certainly expected. Let's not yet mark the bug as fixed as I suppose we will have to do something about this rowid mess. Thanks again SQLite. --- src/sources/sqlite/sqlite-cast-rules.lisp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sources/sqlite/sqlite-cast-rules.lisp b/src/sources/sqlite/sqlite-cast-rules.lisp index d77adf6..59630df 100644 --- a/src/sources/sqlite/sqlite-cast-rules.lisp +++ b/src/sources/sqlite/sqlite-cast-rules.lisp @@ -58,7 +58,8 @@ (let* ((sqlite-type-name (string-downcase sqlite-type-name)) (tokens (remove-if (lambda (token) (or (member token '("unsigned" "short" - "varying" "native") + "varying" "native" + "auto_increment") :test #'string-equal) ;; remove typemod too, as in "integer (8)" (char= #\( (aref token 0))))