Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Deprecate the MySQL configuration setting explicit_defaults_for_timestamp #8126

@meker12

Description

@meker12

Topic clarification/correction request

Dear Developers, we have a devdocs page https://devdocs.magento.com/guides/v2.3/install-gde/prereq/mysql.html#instgde-prereq-mysql-config that says the setting should be set to ON:

In order for MySQL TIMESTAMP fields to follow the preferences and composition expected by Magento’s declarative schema architecture, the system variable explicit_defaults_for_timestamp must be set to on.

References;

MySQL 5.7
MariaDB
If this setting is not enabled, setup:db:status will always report that Declarative Schema is not up to date.
{code}

But by default on Cloud it set to OFF for all accounts:

{code}
MariaDB [(none)]> show global variables like 'explicit_defaults_for_timestamp';
+---------------------------------+-------+
| Variable_name | Value |
+---------------------------------+-------+
| explicit_defaults_for_timestamp | OFF |
+---------------------------------+-------+
{code}


Here is a detailed definition for this option: https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_explicit_defaults_for_timestamp

But it is already deprecated:

The explicit_defaults_for_timestamp setting is itself deprecated because its only purpose is to permit control over deprecated TIMESTAMP behaviors that are to be removed in a future MySQL release. When removal of those behaviors occurs, explicit_defaults_for_timestamp will have no purpose and will be removed as well.
{quote}

Possible solutions

Add a note that this configuration is deprecated.

Additional information

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions