Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
[DBUtil] Allow NULL when adding fields
  • It looks like when using DBUtil::add_fields() to add a field, the NOT NULL expression is included by default. Is it possible to override this when using add_fields() to allow NULL values? I want the value to be NULL by default. I tried \DBUtil::add_fields('contact_date' => array('type' => 'date', 'default' => NULL)) but I get an 'Invalid default value' error.
  • The correct definition is
    'null' => true
    

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion