Add a casting rule for the I data type in DBF files.

The I data type is mapped to a PostgreSQL integer.

See #929.
This commit is contained in:
Dimitri Fontaine 2019-05-08 23:36:17 +02:00
parent 7d2e5ae941
commit 2b6fb3e6c2
2 changed files with 6 additions and 1 deletions

View File

@ -65,7 +65,8 @@ When migrating from DB3 the following Casting Rules are provided::
type C to text using db3-trim-string
type M to text using db3-trim-string
type N to numeric using db3-numeric-to-pgsql-numeric
type N to numeric using db3-numeric-to-pgsql-integer
type I to numeric using db3-numeric-to-pgsql-numeric
type L to boolean using logical-to-boolean
type D to date using db3-date-to-pgsql-date

View File

@ -16,6 +16,10 @@
:target (:type "numeric")
:using pgloader.transforms::db3-numeric-to-pgsql-numeric)
(:source (:type "I")
:target (:type "integer")
:using pgloader.transforms::db3-numeric-to-pgsql-integer)
(:source (:type "L")
:target (:type "boolean")
:using pgloader.transforms::logical-to-boolean)