-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Online DDL: new message_timestamp
column in schema_migrations
table
#16633
Online DDL: new message_timestamp
column in schema_migrations
table
#16633
Conversation
Signed-off-by: Shlomi Noach <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
message_timestamp
column in schema_migrations
table
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #16633 +/- ##
==========================================
- Coverage 68.98% 68.98% -0.01%
==========================================
Files 1562 1562
Lines 200690 200690
==========================================
- Hits 138449 138436 -13
- Misses 62241 62254 +13 ☔ View full report in Codecov by Sentry. |
@@ -42,6 +42,7 @@ CREATE TABLE IF NOT EXISTS schema_migrations | |||
`migration_context` varchar(1024) NOT NULL DEFAULT '', | |||
`ddl_action` varchar(16) NOT NULL DEFAULT '', | |||
`message` text NOT NULL, | |||
`message_timestamp` timestamp(6) NULL DEFAULT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why timestamp(6) and not a normal timestamp like other columns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Practice tells me that I always end up "upgrading" a timetstamp
to timestamp(6)
. I just appreciate the granularity, especially when it comes to critical points such as cutover where it can really clarify what's going on.
Description
This PR introduces
schema_migrations. message_timestamp
column, which gets updated to current timestamp whenevermessage
gets updated.The column gets auto-populated with the same query that updates the
message
. There is thus no actual code change other than an SQL.Related Issue(s)
Fixes #16632
Checklist
Deployment Notes