Fix vxDelta table creation failure on MariaDB with NO_ZERO_DATE#157
Draft
Fix vxDelta table creation failure on MariaDB with NO_ZERO_DATE#157
Conversation
…MP fields Co-authored-by: Mark-H <312944+Mark-H@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix creation of modx_versionx_delta table in MariaDB 10.4
Fix vxDelta table creation failure on MariaDB with NO_ZERO_DATE
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
NO_ZERO_DATEis in the active SQL mode, creatingmodx_versionx_deltafails because MySQL/MariaDB silently assignsDEFAULT '0000-00-00 00:00:00'to anyTIMESTAMP NOT NULLcolumn lacking an explicit default — and then rejects that zero-date default as invalid.Changes
time_startandtime_endfromnull="false"tonull="true"in bothversionx.mysql.schema.xmlandvxdelta.map.inc.php. This shifts the implicit column default from the forbidden'0000-00-00 00:00:00'toNULL, which is valid under all SQL modes.The existing
alterFieldcalls for both columns intables.resolver.phpalready handle the upgrade path for existing installations.Original prompt
NO_ZERO_DATE#156💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.