From 42abc21961bad987efec0dab50f46de559c92023 Mon Sep 17 00:00:00 2001 From: Mohamed Moustafa Date: Fri, 11 Jul 2025 13:24:57 +0200 Subject: [PATCH 1/3] Ignore the auto-assign Duo Pro column Ignore the NamespaceSettign column enable_auto_assign_gitlab_duo_pro_seats --- app/models/namespace_setting.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/namespace_setting.rb b/app/models/namespace_setting.rb index 0b343338911a47..b085270b1cab65 100644 --- a/app/models/namespace_setting.rb +++ b/app/models/namespace_setting.rb @@ -10,6 +10,7 @@ class NamespaceSetting < ApplicationRecord columns_changing_default :require_dpop_for_manage_api_endpoints ignore_column :token_expiry_notify_inherited, remove_with: '17.9', remove_after: '2025-01-11' + ignore_column :enable_auto_assign_gitlab_duo_pro_seats, remove_with: '18.5', remove_after: '2025-08-16' enum :pipeline_variables_default_role, ProjectCiCdSetting::PIPELINE_VARIABLES_OVERRIDE_ROLES, prefix: true ignore_column :third_party_ai_features_enabled, remove_with: '16.11', remove_after: '2024-04-18' -- GitLab From ec751f438a396cf47a9f89b776baf8efa28ca60d Mon Sep 17 00:00:00 2001 From: Mohamed Moustafa Date: Fri, 4 Jul 2025 11:27:58 +0200 Subject: [PATCH 2/3] Remove enable_auto_assign_gitlab_duo_pro_seats Remove enable_auto_assign_gitlab_duo_pro_seats setting column from the namespace_settings table, as part of rolling back https://gitlab.com/groups/gitlab-org/-/epics/13637. Changelog: removed --- ...4854_remove_auto_assign_duo_pro_namespace_settings.rb | 9 +++++++++ db/schema_migrations/20250704084854 | 1 + db/structure.sql | 1 - 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb create mode 100644 db/schema_migrations/20250704084854 diff --git a/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb b/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb new file mode 100644 index 00000000000000..d72561d72936cd --- /dev/null +++ b/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class RemoveAutoAssignDuoProNamespaceSettings < Gitlab::Database::Migration[2.3] + milestone '18.2' + + def change + remove_column :namespace_settings, :enable_auto_assign_gitlab_duo_pro_seats, :boolean, default: false, null: false + end +end diff --git a/db/schema_migrations/20250704084854 b/db/schema_migrations/20250704084854 new file mode 100644 index 00000000000000..5aec12b7e45838 --- /dev/null +++ b/db/schema_migrations/20250704084854 @@ -0,0 +1 @@ +c7ae95fb19f00f9500332b311816c0b366471646745a63ef0998d9b7d3440d06 \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 25bb90ea57e8b8..4c4c3b45f736b9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -18464,7 +18464,6 @@ CREATE TABLE namespace_settings ( duo_features_enabled boolean, lock_duo_features_enabled boolean DEFAULT false NOT NULL, disable_personal_access_tokens boolean DEFAULT false NOT NULL, - enable_auto_assign_gitlab_duo_pro_seats boolean DEFAULT false NOT NULL, early_access_program_participant boolean DEFAULT false NOT NULL, remove_dormant_members boolean DEFAULT false NOT NULL, remove_dormant_members_period integer DEFAULT 90 NOT NULL, -- GitLab From 0b754f7c24b1a88fc5e41b29708422743131b9f4 Mon Sep 17 00:00:00 2001 From: Mohamed Moustafa Date: Thu, 10 Jul 2025 13:24:52 +0200 Subject: [PATCH 3/3] Add if_exists to remove_column migration --- ...084854_remove_auto_assign_duo_pro_namespace_settings.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb b/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb index d72561d72936cd..8457bb5c48958d 100644 --- a/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb +++ b/db/post_migrate/20250704084854_remove_auto_assign_duo_pro_namespace_settings.rb @@ -4,6 +4,11 @@ class RemoveAutoAssignDuoProNamespaceSettings < Gitlab::Database::Migration[2.3] milestone '18.2' def change - remove_column :namespace_settings, :enable_auto_assign_gitlab_duo_pro_seats, :boolean, default: false, null: false + remove_column :namespace_settings, + :enable_auto_assign_gitlab_duo_pro_seats, + :boolean, + default: false, + null: false, + if_exists: true end end -- GitLab