Skip to content
代码片段 群组 项目
未验证 提交 285c4c61 编辑于 作者: Terri Chu's avatar Terri Chu 提交者: GitLab
浏览文件

Merge branch '490480-add-organization-id-to-fork-networks' into 'master'

Add `organization_id` field to `fork_networks`

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/182898



Merged-by: default avatarTerri Chu <tchu@gitlab.com>
Approved-by: default avatarDoug Stull <dstull@gitlab.com>
Approved-by: default avatarHunter Stewart <hustewart@gitlab.com>
Approved-by: default avatarTerri Chu <tchu@gitlab.com>
Reviewed-by: default avatarDoug Stull <dstull@gitlab.com>
Reviewed-by: default avatarHunter Stewart <hustewart@gitlab.com>
Co-authored-by: default avatarOlaoluwa Oluro <olaoluro@gitlab.com>
No related branches found
No related tags found
2 合并请求!3031Merge per-main-jh to main-jh by luzhiyuan,!3030Merge per-main-jh to main-jh
...@@ -320,6 +320,10 @@ external_pull_requests: ...@@ -320,6 +320,10 @@ external_pull_requests:
- table: projects - table: projects
column: project_id column: project_id
on_delete: async_delete on_delete: async_delete
fork_networks:
- table: organizations
column: organization_id
on_delete: async_delete
group_security_exclusions: group_security_exclusions:
- table: namespaces - table: namespaces
column: group_id column: group_id
......
# frozen_string_literal: true
class AddOrganizationIdToForkNetworks < Gitlab::Database::Migration[2.2]
milestone '17.10'
enable_lock_retries!
def change
add_column :fork_networks, :organization_id, :bigint, null: true
end
end
# frozen_string_literal: true
class AddIndexForOrganizationIdOnForkNetworks < Gitlab::Database::Migration[2.2]
milestone '17.10'
disable_ddl_transaction!
TABLE_NAME = :fork_networks
INDEX_NAME = 'index_fork_networks_on_organization_id'
def up
add_concurrent_index TABLE_NAME, :organization_id, name: INDEX_NAME
end
def down
remove_concurrent_index_by_name TABLE_NAME, INDEX_NAME
end
end
d211433f7c46ddcf0a85d912b4dbab58af583174415e0a16705087b4d55732f0
\ No newline at end of file
87839950df3e95155710d1572c04ff199557d3feffb6ff9d172521ad9fd7572d
\ No newline at end of file
...@@ -13822,7 +13822,8 @@ ALTER SEQUENCE fork_network_members_id_seq OWNED BY fork_network_members.id; ...@@ -13822,7 +13822,8 @@ ALTER SEQUENCE fork_network_members_id_seq OWNED BY fork_network_members.id;
CREATE TABLE fork_networks ( CREATE TABLE fork_networks (
id bigint NOT NULL, id bigint NOT NULL,
root_project_id bigint, root_project_id bigint,
deleted_root_project_name character varying deleted_root_project_name character varying,
organization_id bigint
); );
   
CREATE SEQUENCE fork_networks_id_seq CREATE SEQUENCE fork_networks_id_seq
...@@ -33123,6 +33124,8 @@ CREATE INDEX index_fork_network_members_on_forked_from_project_id ON fork_networ ...@@ -33123,6 +33124,8 @@ CREATE INDEX index_fork_network_members_on_forked_from_project_id ON fork_networ
   
CREATE UNIQUE INDEX index_fork_network_members_on_project_id ON fork_network_members USING btree (project_id); CREATE UNIQUE INDEX index_fork_network_members_on_project_id ON fork_network_members USING btree (project_id);
   
CREATE INDEX index_fork_networks_on_organization_id ON fork_networks USING btree (organization_id);
CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USING btree (root_project_id); CREATE UNIQUE INDEX index_fork_networks_on_root_project_id ON fork_networks USING btree (root_project_id);
   
CREATE INDEX index_geo_event_log_on_cache_invalidation_event_id ON geo_event_log USING btree (cache_invalidation_event_id) WHERE (cache_invalidation_event_id IS NOT NULL); CREATE INDEX index_geo_event_log_on_cache_invalidation_event_id ON geo_event_log USING btree (cache_invalidation_event_id) WHERE (cache_invalidation_event_id IS NOT NULL);
...@@ -204,7 +204,8 @@ ...@@ -204,7 +204,8 @@
"oauth_device_grants" => "https://gitlab.com/gitlab-org/gitlab/-/issues/496717", "oauth_device_grants" => "https://gitlab.com/gitlab-org/gitlab/-/issues/496717",
"uploads" => "https://gitlab.com/gitlab-org/gitlab/-/issues/398199", "uploads" => "https://gitlab.com/gitlab-org/gitlab/-/issues/398199",
"bulk_import_trackers" => "https://gitlab.com/gitlab-org/gitlab/-/issues/517823", "bulk_import_trackers" => "https://gitlab.com/gitlab-org/gitlab/-/issues/517823",
"ai_duo_chat_events" => "https://gitlab.com/gitlab-org/gitlab/-/issues/516140" "ai_duo_chat_events" => "https://gitlab.com/gitlab-org/gitlab/-/issues/516140",
"fork_networks" => "https://gitlab.com/gitlab-org/gitlab/-/issues/522958"
} }
has_lfk = ->(lfks) { lfks.any? { |k| k.options[:column] == 'organization_id' && k.to_table == 'organizations' } } has_lfk = ->(lfks) { lfks.any? { |k| k.options[:column] == 'organization_id' && k.to_table == 'organizations' } }
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册