Conversation
…nal seconds Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
…onds precision MySQL rejects `datetime(6) DEFAULT CURRENT_TIMESTAMP` with error 1067: the default must carry the same precision as the column. The reflected `CURRENT_TIMESTAMP(6)` (MariaDB: `current_timestamp(6)`) is normalized back to `DATETIME_NOW`, so reading such a column no longer throws and saving the same declaration again gives no diff. Fixes #277 Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.x #278 +/- ##
============================================
+ Coverage 95.72% 95.74% +0.01%
- Complexity 2246 2251 +5
============================================
Files 142 142
Lines 6384 6389 +5
============================================
+ Hits 6111 6117 +6
+ Misses 273 272 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
🔍 What was changed
datetime/timestampcolumns with a size anddefaultValue(AbstractColumn::DATETIME_NOW)renderDEFAULT CURRENT_TIMESTAMP(N)on MySQL, sodatetime(6)no longer fails with error 1067.CURRENT_TIMESTAMP(N)default (MariaDB:current_timestamp(N)) is read asDATETIME_NOW: reading such a column no longer throws, and saving the same declaration again produces no diff.Review notes
datetime→datetime(6)) still produces no ALTER, becausesizeis excluded from MySQL column comparison. That is unchanged here.Checklist