Skip to content
Snippets Groups Projects
Verified Commit 6c4c82d8 authored by Aaron Huntsman's avatar Aaron Huntsman Committed by GitLab
Browse files

Add pipeline_source column to p_ci_build_sources table

parent da438a60
No related branches found
No related tags found
2 merge requests!170053Security patch upgrade alert: Only expose to admins 17-4,!168592Add pipeline_source column to p_ci_build_sources table
# frozen_string_literal: true
class AddPipelineSourceToCiBuildSources < Gitlab::Database::Migration[2.2]
include Gitlab::Database::PartitioningMigrationHelpers
disable_ddl_transaction!
milestone '17.5'
INDEX_NAME = 'index_p_ci_build_sources_on_pipeline_source'
def up
add_column :p_ci_build_sources, :pipeline_source, :smallint
add_concurrent_partitioned_index :p_ci_build_sources, :pipeline_source, name: INDEX_NAME
end
def down
remove_concurrent_partitioned_index_by_name :p_ci_build_sources, INDEX_NAME
remove_column :p_ci_build_sources, :pipeline_source
end
end
70c3b17690dcc95d65f14ff1c3c2356a72b260408149c3e80c2a446d7bc17884
\ No newline at end of file
......@@ -2864,7 +2864,8 @@ CREATE TABLE p_ci_build_sources (
build_id bigint NOT NULL,
partition_id bigint NOT NULL,
project_id bigint NOT NULL,
source smallint NOT NULL
source smallint NOT NULL,
pipeline_source smallint
)
PARTITION BY LIST (partition_id);
 
......@@ -30170,6 +30171,8 @@ CREATE INDEX index_p_ci_build_names_on_project_id_and_build_id ON ONLY p_ci_buil
 
CREATE INDEX index_p_ci_build_names_on_search_vector ON ONLY p_ci_build_names USING gin (search_vector);
 
CREATE INDEX index_p_ci_build_sources_on_pipeline_source ON ONLY p_ci_build_sources USING btree (pipeline_source);
CREATE INDEX index_p_ci_build_sources_on_project_id_and_build_id ON ONLY p_ci_build_sources USING btree (project_id, build_id);
 
CREATE INDEX index_p_ci_build_tags_on_build_id_and_partition_id ON ONLY p_ci_build_tags USING btree (build_id, partition_id);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment