Fix issue_metrics index creation error
What does this MR do and why?
This MR fixes the schema inconsistency error on self-managed instances related to the issue_metrics
table. In some cases the issue_metrics.first_mentioned_in_commit_at
column can have the following type: timestamp with time zone
. According to the structure.sql
the schema should be timestamp without time zone
.
Fix: detect the column type and add the index accordingly.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #343694 (closed)
Edited by Adam Hegyi