Skip to content

Drop default for `work_item_types.id` column

Mario Celi requested to merge 461487-drop-pk-sequence into master

What does this MR do and why?

We don't want to allow the creation of records in the work_item_types table apart from the ones we create with the seeder file by providing a specific ID for each record. We also create these records in older instances via migrations. Now those migrations will also need to specify an ID for the new record.

Not dropping the sequence yet so we can do it in a later migration for safety

Migration output

UP

main: == [advisory_lock_connection] object_id: 128780, pg_backend_pid: 1009
main: == 20240917192118 DropWorkItemTypesIdDefault: migrating =======================
main: == 20240917192118 DropWorkItemTypesIdDefault: migrated (0.0120s) ==============

main: == [advisory_lock_connection] object_id: 128780, pg_backend_pid: 1009
ci: == [advisory_lock_connection] object_id: 129020, pg_backend_pid: 1011
ci: == 20240917192118 DropWorkItemTypesIdDefault: migrating =======================
ci: == 20240917192118 DropWorkItemTypesIdDefault: migrated (0.0144s) ==============

ci: == [advisory_lock_connection] object_id: 129020, pg_backend_pid: 1011

DOWN

main: == [advisory_lock_connection] object_id: 128340, pg_backend_pid: 99077
main: == 20240917192118 DropWorkItemTypesIdDefault: reverting =======================
main: == 20240917192118 DropWorkItemTypesIdDefault: reverted (0.0089s) ==============

main: == [advisory_lock_connection] object_id: 128340, pg_backend_pid: 99077
ci: == [advisory_lock_connection] object_id: 129140, pg_backend_pid: 99347
ci: == 20240917192118 DropWorkItemTypesIdDefault: reverting =======================
ci: == 20240917192118 DropWorkItemTypesIdDefault: reverted (0.0169s) ==============

ci: == [advisory_lock_connection] object_id: 129140, pg_backend_pid: 99347

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #493971 (closed) part of &15272

Edited by Mario Celi

Merge request reports

Loading