You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Column default values like '' or false aren't used when a value is omitted for that column.
For example, if I have a table foo with a column bar that has a default value of '', and I don't provide a value for bar in my call to bulk_insert, the newly-inserted row will have a bar value of NULL, and not '' like I expect.
The issue seems to be the use of #present? to determine a column has a default value:
Column default values like
''
orfalse
aren't used when a value is omitted for that column.For example, if I have a table
foo
with a columnbar
that has a default value of''
, and I don't provide a value forbar
in my call tobulk_insert
, the newly-inserted row will have abar
value ofNULL
, and not''
like I expect.The issue seems to be the use of
#present?
to determine a column has a default value:bulk_insert/lib/bulk_insert/worker.rb
Line 50 in 3ded6b0
The text was updated successfully, but these errors were encountered: