mirror of
https://github.com/dimitri/pgloader.git
synced 2026-05-05 19:06:11 +02:00
Fix default value handling in MS SQL.
When the column is known to be non-nullable, refrain from adding a null default value to it. This also fixes the case of casting from an [int] IDENTITY(1,1) NOT NULL That otherwise did get transformed into a bigserial not null default NULL Causing then the error Database error 42601: multiple default values specified for column ... of table ...
This commit is contained in:
parent
c0f9569ddd
commit
bd84c6fec9
@ -124,7 +124,7 @@
|
||||
;; normalize default values
|
||||
;; see *pgsql-default-values*
|
||||
(setf (column-default pgcol)
|
||||
(cond ((null default) :null)
|
||||
(cond ((and (null default) (column-nullable pgcol)) :null)
|
||||
((and (stringp default) (string= "NULL" default)) :null)
|
||||
|
||||
((and (stringp default)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user