Fix MariaDB compatibility issue with multiple TIMESTAMP defaults
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_TIMESTAMPdefault from thetime_endfield in the XML schema - Updated the corresponding map file to reflect this change
- Kept
time_startwith theCURRENT_TIMESTAMPdefault as the primary timestamp field
Impact
- ✅ Maintains full functionality - the application code explicitly sets both
time_startandtime_endwhen 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.