Fix SQLite processing of columns with a sequence attached.

The handling of the SQLite catalogs where fixed in a previous patch, but
either it's been broken in between or it never actually worked (oops).

Moreover, the recent patch about :on-update-current-timestamp changed the
casting rules matching code and we should position :auto-increment from the
SQLite module rather than "auto_increment" as before. That's better, but
wasn't done.

Fix #563 again, tested with a provided test-case (thanks!).
This commit is contained in:
Dimitri Fontaine 2018-01-31 22:49:10 +01:00
parent 4612e68435
commit 976e4c1c1d
2 changed files with 4 additions and 3 deletions

View File

@ -100,9 +100,9 @@
(seq (sqlite:execute-single db sql)))
(when (and seq (not (zerop seq)))
;; magic marker for `apply-casting-rules'
(log-message :notice "Auto Increment found at ~a.~a"
(log-message :notice "SQLite column ~a.~a uses a sequence"
table-name name)
(setf (coldef-extra field) "auto_increment"))))
(setf (coldef-extra field) :auto-increment))))
(add-field table field)))))
(defun list-all-columns (schema

View File

@ -116,7 +116,8 @@
(list-all-columns schema
:db *sqlite-db*
:including including
:excluding excluding)
:excluding excluding
:db-has-sequences (has-sequences conn))
(when create-indexes
(list-all-indexes schema :db *sqlite-db*))