CakePHP 4: 'Column' cannot be null, but default value defined in database

This isn’t the answer to your question, but more of a design approach. You’re mixing your technologies, in that using CakePHP for some default fields, and your Database for others. So I would be setting all default values in the CakePHP, in the Model/table. That way I only have one place to look and to check for those fields value.

A classic example is the timestamp where in your table you put created and modified fields, but you use your initialize(} $this->addBehavior('Timestamp'); for the “default” values. This allows your app to work on different database paradigms, and someone else if they ever need to maintain it should follow your thinking.

But, as your question asks, I don’t know why it wouldn’t pull the table’s defaults - maybe track down the INSERT query CakePHP is creating to see if it is populating those fields will a null value.