Method: ActiveRecord::ConnectionAdapters::IBM_IDS#set_binary_default

Defined in:
lib/active_record/connection_adapters/ibm_db_adapter.rb

#set_binary_default(value) ⇒ Object

This method throws an error when trying to create a default value on a BLOB/CLOB column for IDS. The documentation states: "if the column is a BLOB or CLOB datatype, NULL is the only valid default value."



4219
4220
4221
4222
4223
# File 'lib/active_record/connection_adapters/ibm_db_adapter.rb', line 4219

def set_binary_default(value)
  return if value == 'NULL'

  raise 'Informix Dynamic Server only allows NULL as a valid default value for a BLOB data type'
end