Add current user todos widget to Epic work item type
What does this MR do and why?
We missed a widget for the new type in !127917 (merged). Now we are only adding that missing widget definition based on this conversation #419995 (comment 1497788984)
DB review
Query plans
https://console.postgres.ai/shared/94fd244f-30ac-40e3-8fb7-d18625d9a826 rollback delete
DELETE FROM
"work_item_widget_definitions"
WHERE
"work_item_widget_definitions"."work_item_type_id" = 91413915
AND "work_item_widget_definitions"."widget_type" = 15
https://console.postgres.ai/shared/4b4eab15-2e63-45ad-b267-01e816e3e570 upsert widget definition
INSERT INTO "work_item_widget_definitions" (
"work_item_type_id", "name", "widget_type"
)
VALUES
(
91413915, 'Current user todos', 15
) ON CONFLICT ("work_item_type_id", "name")
WHERE
(namespace_id IS NULL) DO
UPDATE
SET
"widget_type" = excluded."widget_type" RETURNING "id"
Migration output
UP
bin/rails db:migrate
main: == [advisory_lock_connection] object_id: 225120, pg_backend_pid: 34118
main: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: migrating ======
main: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: migrated (0.0271s)
main: == [advisory_lock_connection] object_id: 225120, pg_backend_pid: 34118
ci: == [advisory_lock_connection] object_id: 225360, pg_backend_pid: 34120
ci: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: migrating ======
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_internal, :gitlab_shared].
ci: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: migrated (0.0095s)
ci: == [advisory_lock_connection] object_id: 225360, pg_backend_pid: 34120
DOWN
bin/rails db:rollback:main db:rollback:ci
main: == [advisory_lock_connection] object_id: 224740, pg_backend_pid: 33212
main: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: reverting ======
main: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: reverted (0.0213s)
main: == [advisory_lock_connection] object_id: 224740, pg_backend_pid: 33212
ci: == [advisory_lock_connection] object_id: 234860, pg_backend_pid: 33519
ci: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: reverting ======
ci: -- The migration is skipped since it modifies the schemas: [:gitlab_main].
ci: -- This database can only apply migrations in one of the following schemas: [:gitlab_ci, :gitlab_internal, :gitlab_shared].
ci: == 20230802212443 AddCurrentUserTodosWidgetToEpicWorkItemType: reverted (0.0075s)
ci: == [advisory_lock_connection] object_id: 234860, pg_backend_pid: 33519
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 #419995 (closed)
Edited by Mario Celi