mirror of
https://github.com/dimitri/pgloader.git
synced 2025-08-08 15:27:00 +02:00
Drop default value on bigserial CAST in MS SQL.
This is a blind attempt to fix #354.
This commit is contained in:
parent
57f7fd1d4e
commit
b7a873c03f
@ -109,7 +109,11 @@
|
|||||||
(declare (ignore schema)) ; FIXME
|
(declare (ignore schema)) ; FIXME
|
||||||
(let* ((ctype (mssql-column-ctype field))
|
(let* ((ctype (mssql-column-ctype field))
|
||||||
(pgcol
|
(pgcol
|
||||||
(apply-casting-rules table-name name type ctype default nullable nil)))
|
(apply-casting-rules table-name name type ctype
|
||||||
|
;; drop default value (forcing it to nil
|
||||||
|
;; here) for serial data types
|
||||||
|
(unless (string= "bigserial" ctype) default)
|
||||||
|
nullable nil)))
|
||||||
;; the MS SQL driver smartly maps data to the proper CL type, but the
|
;; the MS SQL driver smartly maps data to the proper CL type, but the
|
||||||
;; pgloader API only wants to see text representations to send down the
|
;; pgloader API only wants to see text representations to send down the
|
||||||
;; COPY protocol.
|
;; COPY protocol.
|
||||||
|
Loading…
Reference in New Issue
Block a user