Skip to content

Fix issue_metrics index creation error

Adam Hegyi requested to merge 343694-fix-issue-metrics-index-creation-error into master

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.

Related to #343694 (closed)

Edited by Adam Hegyi

Merge request reports