Skip to content

Add composite identity enforce setting to users

What does this MR do and why?

Adds a new composite_identity_enforced column to users with default value false. This can be used to create service accounts with enforcing composite identity added in Add composite identity support using RequestSto... (!173006 - merged).

Exception request to add new column to users: https://gitlab.com/gitlab-org/database-team/team-tasks/-/issues/476+

Migration output

up

$ bundle exec rake db:migrate                                                                                  ─╯
DEPRECATION WARNING: Support for Rails versions < 7.1 is deprecated and will be removed from ViewComponent 4.0.0 (ViewComponent v4 will remove support for Rails versions < 7.1 no earlier than April 1, 2025) (called from <main> at /Users/ifarkas/code/gitlab-development-kit/gitlab/config/environment.rb:7)
main: == [advisory_lock_connection] object_id: 130360, pg_backend_pid: 52338
main: == 20241127135043 AddCompositeIdentityEnforcedToUsers: migrating ==============
main: -- add_column(:users, :composite_identity_enforced, :boolean, {:default=>false, :null=>false})
main:    -> 0.0045s
main: == 20241127135043 AddCompositeIdentityEnforcedToUsers: migrated (0.0086s) =====

main: == [advisory_lock_connection] object_id: 130360, pg_backend_pid: 52338
ci: == [advisory_lock_connection] object_id: 130700, pg_backend_pid: 52340
ci: == 20241127135043 AddCompositeIdentityEnforcedToUsers: migrating ==============
ci: -- add_column(:users, :composite_identity_enforced, :boolean, {:default=>false, :null=>false})
ci:    -> 0.0037s
ci: == 20241127135043 AddCompositeIdentityEnforcedToUsers: migrated (0.0109s) =====

ci: == [advisory_lock_connection] object_id: 130700, pg_backend_pid: 52340

down

$ bundle exec rake db:migrate:down:main VERSION=20241127135043                                                 ─╯
DEPRECATION WARNING: Support for Rails versions < 7.1 is deprecated and will be removed from ViewComponent 4.0.0 (ViewComponent v4 will remove support for Rails versions < 7.1 no earlier than April 1, 2025) (called from <main> at /Users/ifarkas/code/gitlab-development-kit/gitlab/config/environment.rb:7)
main: == [advisory_lock_connection] object_id: 129920, pg_backend_pid: 53569
main: == 20241127135043 AddCompositeIdentityEnforcedToUsers: reverting ==============
main: -- remove_column(:users, :composite_identity_enforced, :boolean, {:default=>false, :null=>false})
main:    -> 0.0020s
main: == 20241127135043 AddCompositeIdentityEnforcedToUsers: reverted (0.0073s) =====

main: == [advisory_lock_connection] object_id: 129920, pg_backend_pid: 53569

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Imre Farkas

Merge request reports

Loading