Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb')
-rw-r--r--db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb b/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb
index 6de1587e812..994755dbd28 100644
--- a/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb
+++ b/db/post_migrate/20231109120223_ensure_id_uniqueness_for_p_ci_builds_v4.rb
@@ -27,6 +27,7 @@ class EnsureIdUniquenessForPCiBuildsV4 < Gitlab::Database::Migration[2.2]
return unless should_run?
drop_trigger(TABLE_NAME, TRIGGER_NAME, if_exists: true)
+ return if trigger_exists?(:ci_builds, TRIGGER_NAME)
Gitlab::Database::PostgresPartitionedTable.each_partition(TABLE_NAME) do |partition|
create_trigger(partition.identifier, TRIGGER_NAME, FUNCTION_NAME, fires: 'BEFORE INSERT')