Fix SQL types creation: consider views too.

When migrating views from e.g. MySQL it is necessary to consider the
user defined SQL types (ENUMs) those views might be using.
This commit is contained in:
Dimitri Fontaine 2016-12-18 19:19:25 +01:00
parent ad56cf808b
commit 320a545533

View File

@ -15,7 +15,8 @@
"Create the needed data types for given CATALOG."
(let ((sqltype-list))
;; build the sqltype list
(loop :for table :in (table-list catalog)
(loop :for table :in (append (table-list catalog)
(view-list catalog))
:do (loop :for column :in (table-column-list table)
:do (when (typep (column-type-name column) 'sqltype)
(pushnew (column-type-name column) sqltype-list