Skip to content

Backfill default protection branch defaults in application setting

What does this MR do and why?

Backfill default protection branch defaults in application setting

This commit backfills default protection branch defaults in application setting

Changelog: other

Migration Logs

❯ rake db:migrate:down:main VERSION=20230723203612
main: == [advisory_lock_connection] object_id: 227820, pg_backend_pid: 25066
main: == 20230723203612 BackfillDefaultBranchProtectionApplicationSetting: reverting
main: == 20230723203612 BackfillDefaultBranchProtectionApplicationSetting: reverted (0.2817s)

main: == [advisory_lock_connection] object_id: 227820, pg_backend_pid: 25066

❯ rake db:migrate:up:main VERSION=20230723203612

main: == [advisory_lock_connection] object_id: 223780, pg_backend_pid: 26209
main: == 20230723203612 BackfillDefaultBranchProtectionApplicationSetting: migrating
Add test case and remove application code
main: == 20230723203612 BackfillDefaultBranchProtectionApplicationSetting: migrated (0.3323s)

main: == [advisory_lock_connection] object_id: 223780, pg_backend_pid: 26209

How to set up and validate locally

  1. run rake db:migrate.
  2. verify ApplicationSetting.last.default_protection_branch_defaults is correctly filled.

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

Edited by Harsimar Sandhu

Merge request reports