diff --git a/src/sources/db3/db3-cast-rules.lisp b/src/sources/db3/db3-cast-rules.lisp index a711d68..17dec83 100644 --- a/src/sources/db3/db3-cast-rules.lisp +++ b/src/sources/db3/db3-cast-rules.lisp @@ -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 diff --git a/src/sources/db3/db3-schema.lisp b/src/sources/db3/db3-schema.lisp index 1e2baa1..e6934f6 100644 --- a/src/sources/db3/db3-schema.lisp +++ b/src/sources/db3/db3-schema.lisp @@ -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)))))