diff --git a/db/docs/abuse_report_assignees.yml b/db/docs/abuse_report_assignees.yml index 863609a0cae93325f9ae2b6d50793a07ea19ab33..2b887ab05057fc4a3a6c58b3b0497346adf0b023 100644 --- a/db/docs/abuse_report_assignees.yml +++ b/db/docs/abuse_report_assignees.yml @@ -7,6 +7,7 @@ feature_categories: description: Stores information linking abuse reports and users (assignee) introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/134240 milestone: '16.7' -gitlab_schema: gitlab_main +gitlab_schema: gitlab_main_org +sharding_key: + organization_id: organizations table_size: small -sharding_key_issue_url: https://gitlab.com/gitlab-org/gitlab/-/issues/553428 diff --git a/db/migrate/20250924121403_remove_default_from_abuse_report_assignees_organization_id.rb b/db/migrate/20250924121403_remove_default_from_abuse_report_assignees_organization_id.rb new file mode 100644 index 0000000000000000000000000000000000000000..73a2c7b76ef57ebc773910eba332c783ee437e2b --- /dev/null +++ b/db/migrate/20250924121403_remove_default_from_abuse_report_assignees_organization_id.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class RemoveDefaultFromAbuseReportAssigneesOrganizationId < Gitlab::Database::Migration[2.3] + milestone '18.5' + + def change + change_column_default(:abuse_report_assignees, :organization_id, from: 1, to: nil) + end +end diff --git a/db/schema_migrations/20250924121403 b/db/schema_migrations/20250924121403 new file mode 100644 index 0000000000000000000000000000000000000000..5fad6b8706f6fbac1a7c1ba2202bdec6d5c976fb --- /dev/null +++ b/db/schema_migrations/20250924121403 @@ -0,0 +1 @@ +2a086dc954b59b5dc5b1ad0a4894882c52d726ac8a5bb1c446a7085dd080c7cd \ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index c4c3875155a13d9dd11a5d635758c70ab1c74b62..4bc4977e4961e161f73da1c0437bcf844f29153b 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9309,7 +9309,7 @@ CREATE TABLE abuse_report_assignees ( abuse_report_id bigint NOT NULL, created_at timestamp with time zone NOT NULL, updated_at timestamp with time zone NOT NULL, - organization_id bigint DEFAULT 1 NOT NULL + organization_id bigint NOT NULL ); CREATE SEQUENCE abuse_report_assignees_id_seq diff --git a/spec/lib/gitlab/database/sharding_key_spec.rb b/spec/lib/gitlab/database/sharding_key_spec.rb index f3da05caf6af29827ba44146f9fdee53c0b9bff9..0230c7025062184554438fabc6de7bc1fd83559b 100644 --- a/spec/lib/gitlab/database/sharding_key_spec.rb +++ b/spec/lib/gitlab/database/sharding_key_spec.rb @@ -318,7 +318,6 @@ "abuse_report_labels" => "https://gitlab.com/gitlab-org/gitlab/-/issues/553427", "abuse_report_events" => "https://gitlab.com/gitlab-org/gitlab/-/issues/553429", "abuse_events" => "https://gitlab.com/gitlab-org/gitlab/-/issues/553427", - "abuse_report_assignees" => "https://gitlab.com/gitlab-org/gitlab/-/issues/553428", "labels" => "https://gitlab.com/gitlab-org/gitlab/-/issues/563889", "notes" => "https://gitlab.com/gitlab-org/gitlab/-/issues/569521", "notes_archived" => "https://gitlab.com/gitlab-org/gitlab/-/issues/569521",