Important: #106401 - Treat 0 as a defined value for nullable datetime fields

See forge#106401

Description

For nullable integer-based datetime fields, the value 0 now explicitly represents the Unix epoch time (1970-01-01T00:00:00Z) instead of being interpreted as an empty value by FormEngine.

Only an explicit null database value will be considered an empty value.

The default database schema that is generated from TCA has been adapted to generate datetime columns with DEFAULT NULL instead of DEFAULT 0 if they have been configured to be nullable.

Given the following TCA definition:

'columns' => [
    'mydatefield' => [
        'config' => [
            'type' => 'datetime',
            'nullable' => true,
        ],
    ],
],
Copied!

The previously generated SQL statement will be changed from DEFAULT 0 to DEFAULT NULL:

Nullable datetime schema before this change
`mydatefield` bigint(20) DEFAULT 0
Copied!
Nullable datetime schema after this change
`mydatefield` bigint(20) DEFAULT NULL
Copied!

Fields that have not been explicitly configured to be nullable are unaffected and will default to 0 as before.