Skip to content
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

Closed
meker12 opened this issue Oct 26, 2020 · 1 comment · Fixed by #8137
Closed

Deprecate the MySQL configuration setting explicit_defaults_for_timestamp #8126

meker12 opened this issue Oct 26, 2020 · 1 comment · Fixed by #8137
Assignees

Comments

@meker12
Copy link
Contributor

meker12 commented Oct 26, 2020

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

@m2-assistant
Copy link

m2-assistant bot commented Oct 26, 2020

Hi @meker12. Thank you for your report.
To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants