Add index for project_id and lower(name) for timeline event tags table
What does this MR do and why?
This MR adds a new index with project_id
and lower(name)
to incident_management_timeline_event_tags
.
Migrations
Add text limit to new col
UP
main: == 20221109100217 AddTextLimitToTagsKey: migrating ============================
main: -- transaction_open?()
main: -> 0.0000s
main: -- current_schema()
main: -> 0.0007s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute("ALTER TABLE incident_management_timeline_event_tags\nADD CONSTRAINT check_060ffe253e\nCHECK ( char_length(key) <= 255 )\nNOT VALID;\n")
main: -> 0.0009s
main: -- current_schema()
main: -> 0.0001s
main: -- execute("SET statement_timeout TO 0")
main: -> 0.0001s
main: -- execute("ALTER TABLE incident_management_timeline_event_tags VALIDATE CONSTRAINT check_060ffe253e;")
main: -> 0.0011s
main: -- execute("RESET statement_timeout")
main: -> 0.0002s
main: == 20221109100217 AddTextLimitToTagsKey: migrated (0.0129s) ===================
DOWN
main: == 20221109100217 AddTextLimitToTagsKey: reverting ============================
main: -- transaction_open?()
main: -> 0.0000s
main: -- transaction_open?()
main: -> 0.0000s
main: -- execute(" ALTER TABLE incident_management_timeline_event_tags\n DROP CONSTRAINT IF EXISTS check_060ffe253e\n")
main: -> 0.0007s
main: == 20221109100217 AddTextLimitToTagsKey: reverted (0.0092s) ===================
How to set up and validate locally
- Run the migrations and check relevant changes in
db/structure.sql
and database tables.
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 #373853 (closed)
Edited by Rajendra Kadam