Fix MS SQL tinyint identity support.

Add a cast rule to support tinyint being an “identity” type in MS SQL, which
means using a sequence to derive its values from. We didn't address the
whole MS SQL integer type tower here, and suspect we will have to add more
in the future.

Fix #528 where I could have access to a test case and easily reproduce the
bug, thanks!
This commit is contained in:
Dimitri Fontaine 2017-03-22 11:38:40 +01:00
parent 940fc63a5e
commit 296e571e27

View File

@ -15,6 +15,11 @@
(:source (:type "int" :auto-increment t)
:target (:type "bigserial" :drop-default t))
(:source (:type "tinyint") :target (:type "smallint"))
(:source (:type "tinyint" :auto-increment t)
:target (:type "serial"))
(:source (:type "bit") :target (:type "boolean")
:using pgloader.transforms::sql-server-bit-to-boolean)
@ -27,8 +32,6 @@
(:source (:type "geography") :target (:type "bytea")
:using pgloader.transforms::byte-vector-to-bytea)
(:source (:type "tinyint") :target (:type "smallint"))
(:source (:type "float") :target (:type "float")
:using pgloader.transforms::float-to-string)