mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 07:16:58 +02:00
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:
parent
ca92cdbf20
commit
351ce3faaf
@ -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
|
||||
|
@ -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)))))
|
||||
|
Loading…
Reference in New Issue
Block a user