Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix modManagerLog MySQL > 5.7.8 #16520

Closed
wants to merge 1 commit into from
Closed

Fix modManagerLog MySQL > 5.7.8 #16520

wants to merge 1 commit into from

Conversation

Mark-H
Copy link
Collaborator

@Mark-H Mark-H commented Feb 10, 2024

What does it do?

Add right default value for datatime-type column in modx_manager_log table

Re-up of #15736 with migration

Why is it needed?

Beginning with MySQL > 5.7.8 added strict modes ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, NO_ZERO_IN_DATE. In this strict modes datatime default value cannot be NULL and must be > '0000-00-00'.

How to test

Install/update on MySQL 5.7.8

Related issue(s)/PR(s)

Re-up of #15736

@Mark-H Mark-H added this to the v3.1.0 milestone Feb 10, 2024
Add right default value for datatime-type column in modx_manager_log table

Re-up of modxcms#15736 with migration

Satisfy phpcs
@opengeek
Copy link
Member

I want to target the upgrade scripts on this one to 3.0.x. Do you mind if I alter the PR, @Mark-H? I'll also deal with applying the same changes to 2.x.

@Mark-H
Copy link
Collaborator Author

Mark-H commented Feb 16, 2024

Go for it!

@opengeek
Copy link
Member

I had to resubmit it as #16526 since I had to cherry-pick it on top of the 3.0.x branch.

@opengeek opengeek closed this Feb 16, 2024
opengeek added a commit that referenced this pull request Mar 25, 2024
### What does it do?
Adds a default value for the datetime column in the modx_manager_log
table that is compatible with strict modes, which may be enabled in some
environments.

Re-up of #15736 with migration
Re-up of #16520 to target 3.0.x

### Why is it needed?
Beginning with MySQL > 5.7.8 added strict modes
ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, NO_ZERO_IN_DATE. With these
strict modes enabled, a datetime default value cannot be NULL and must
be > '0000-00-00'.

### How to test
Install/update on MySQL 5.7.8

### Related issue(s)/PR(s)
Re-up of #15736
Re-up of #16520

---------

Co-authored-by: Mark Hamstra <[email protected]>
opengeek added a commit that referenced this pull request Mar 25, 2024
### What does it do?
Adds a default value for the datetime column in the modx_manager_log
table that is compatible with strict modes, which may be enabled in some
environments.

Re-up of #15736 with migration
Re-up of #16520 to target 3.0.x

### Why is it needed?
Beginning with MySQL > 5.7.8 added strict modes
ERROR_FOR_DIVISION_BY_ZERO, NO_ZERO_DATE, NO_ZERO_IN_DATE. With these
strict modes enabled, a datetime default value cannot be NULL and must
be > '0000-00-00'.

### How to test
Install/update on MySQL 5.7.8

### Related issue(s)/PR(s)
Re-up of #15736
Re-up of #16520

---------

Co-authored-by: Mark Hamstra <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants