Skip to content

Conversation

Copilot
Copy link

@Copilot Copilot AI commented Jul 8, 2025

Resolves the MariaDB compatibility error when creating the versionx_delta table during installation.

Problem

MariaDB enforces a restriction where only one TIMESTAMP column per table can have CURRENT_TIMESTAMP in the DEFAULT or ON UPDATE clause. The vxDelta table definition had both time_start and time_end fields configured with default="CURRENT_TIMESTAMP", causing this error:

Incorrect table definition; there can be only one TIMESTAMP column with CURRENT_TIMESTAMP in DEFAULT or ON UPDATE clause

Solution

  • Removed the CURRENT_TIMESTAMP default from the time_end field in the XML schema
  • Updated the corresponding map file to reflect this change
  • Kept time_start with the CURRENT_TIMESTAMP default as the primary timestamp field

Impact

  • ✅ Maintains full functionality - the application code explicitly sets both time_start and time_end when creating deltas
  • ✅ Resolves MariaDB installation errors
  • ✅ Preserves existing behavior for MySQL users
  • ✅ Minimal change with no breaking changes

The fix ensures compatibility with MariaDB while maintaining the existing delta creation logic where both timestamps are set to the same value ($now) by the application.

Fixes #148.


💡 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.

@Copilot Copilot AI changed the title [WIP] Incompatibility with MariaDB Fix MariaDB compatibility issue with multiple TIMESTAMP defaults Jul 8, 2025
@Copilot Copilot AI requested a review from Mark-H July 8, 2025 02:29
Copilot finished work on behalf of Mark-H July 8, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility with MariaDB
2 participants