Rename pgloader's own DB3 field structure.

That's to avoid a name conflict with the cl-db3 package. In SBCL 1.5.2 in
Travis this conflict is an hard error and provoque failure to build the
pgloader binary.
This commit is contained in:
Dimitri Fontaine 2019-05-09 10:41:40 +02:00
parent ca92cdbf20
commit 351ce3faaf
2 changed files with 6 additions and 6 deletions

View File

@ -33,11 +33,11 @@
:using pgloader.transforms::db3-trim-string))
"Data Type Casting rules to migrate from DB3 to PostgreSQL")
(defstruct (db3-field
(:constructor make-db3-field (name type length)))
(defstruct (db3-coldef
(:constructor make-db3-coldef (name type length)))
name type length default (nullable t) extra)
(defmethod cast ((field db3-field) &key table)
(defmethod cast ((field db3-coldef) &key table)
"Return the PostgreSQL type definition given the DB3 one."
(let ((table-name (table-name table)))
(with-slots (name type length default nullable extra) field

View File

@ -38,6 +38,6 @@
"Return the list of columns for the given DB3-FILE-NAME."
(loop
:for field :in (db3::fields db3)
:do (add-field table (make-db3-field (db3::field-name field)
(string (db3::field-type field))
(db3::field-length field)))))
:do (add-field table (make-db3-coldef (db3::field-name field)
(string (db3::field-type field))
(db3::field-length field)))))