Skip to content

Add post migration for deleting tag and remove post creation of tags

What does this MR do and why?

In !101738 (comment 1159315982) we decided to add a new column to the IncidentManagement::TimelineEventTag table and migrate data to the new column.

To save the migration hassle, and since the data from that table is not referenced anywhere nor it is used anywhere, we decided to delete the existing data from the table in a post-deployment migration. This data was added from !101481 (merged) in a post-creation worker in a project.

We have commented and removed the call to add data in post creation worker to not add any new entries until the table schema is updated with the new column.

The query plan for delete statement - https://console.postgres.ai/gitlab/gitlab-production-tunnel-pg12/sessions/13026/commands/45674

Migration

This migration will truncate the incident_management_timeline_event_tags table.

UP

main: == 20221108045019 TruncateTimelineEventTagsTable: migrating ===================
main: -- execute("TRUNCATE TABLE incident_management_timeline_event_tags CASCADE")
main:    -> 0.0040s
main: == 20221108045019 TruncateTimelineEventTagsTable: migrated (0.0046s) ==========

DOWN

main: == 20221108045019 TruncateTimelineEventTagsTable: reverting ===================
main: == 20221108045019 TruncateTimelineEventTagsTable: reverted (0.0005s) ==========

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 #373853 (closed)

Edited by Rajendra Kadam

Merge request reports