Skip to content

loadDefaultValues, NOT NULL on TIMESTAMP column MySql #9759

@andrewblake1

Description

@andrewblake1

Not sure if the following is desired behaviour:

Because MySql unfortunately automatically adds a default of CURRENT_TIMESTAMP to the first timestamp column of a table (even when NOT NULL attribute is set) this comes through as the value text set for the attribute in loadDefaultValues.

While it is annoying behaviour from MySql it is the documented action for first TIMESTAMP column.

In one situation I found, I was wondering why a required rule wasn't being enforced on a DatePicker via kartik-v\DateControl. It was because with DateControl the submitted input is hidden and was carrying a value of "CURRENT_TIMESTAMP".

Have overridden in loadDevaultValues and tested for this in my code but thought I would raise in case it was undesired in general.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions