summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-10-03 12:08:27 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-10-03 12:08:27 +0000
commit077b0a79d52753d020280ed8d58f97f8207b42de (patch)
tree79c6a7d3bbc41915acfff72e4620e7c4490528bf /db
parent10d4625ed3b73f73bc67bf7d35347dcd1912cf7b (diff)
downloadgitlab-ce-077b0a79d52753d020280ed8d58f97f8207b42de.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb16
-rw-r--r--db/schema_migrations/202209301101271
-rw-r--r--db/structure.sql2
3 files changed, 17 insertions, 2 deletions
diff --git a/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb b/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb
new file mode 100644
index 00000000000..4c23cdc5284
--- /dev/null
+++ b/db/post_migrate/20220930110127_remove_unique_index_build_id_to_ci_builds_metadata.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class RemoveUniqueIndexBuildIdToCiBuildsMetadata < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ TABLE_NAME = :ci_builds_metadata
+ INDEX_NAME = :index_ci_builds_metadata_on_build_id
+
+ def up
+ remove_concurrent_index_by_name(TABLE_NAME, INDEX_NAME)
+ end
+
+ def down
+ add_concurrent_index(TABLE_NAME, :build_id, unique: true, name: INDEX_NAME)
+ end
+end
diff --git a/db/schema_migrations/20220930110127 b/db/schema_migrations/20220930110127
new file mode 100644
index 00000000000..b88603e17d9
--- /dev/null
+++ b/db/schema_migrations/20220930110127
@@ -0,0 +1 @@
+6a37ea8ea1ae2b90d12db67b2fa6adac2ed5b936f6c45d2142dc8390883f764a \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 122ad10e9ae..cad9503e548 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -28036,8 +28036,6 @@ CREATE UNIQUE INDEX index_ci_build_trace_chunks_on_build_id_and_chunk_index ON c
CREATE INDEX index_ci_build_trace_metadata_on_trace_artifact_id ON ci_build_trace_metadata USING btree (trace_artifact_id);
-CREATE UNIQUE INDEX index_ci_builds_metadata_on_build_id ON ci_builds_metadata USING btree (build_id);
-
CREATE INDEX index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts ON ci_builds_metadata USING btree (build_id) WHERE (has_exposed_artifacts IS TRUE);
CREATE INDEX index_ci_builds_metadata_on_build_id_and_id_and_interruptible ON ci_builds_metadata USING btree (build_id) INCLUDE (id) WHERE (interruptible = true);