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
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-01 19:00:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-01 19:00:51 +0300
commitb2e9603724fc002b87cc23926a613b4e7ab10a42 (patch)
tree53b0a2aa2157561545516f0d2baa50de81094fb5 /db
parenta5131ced0f04bd5e8bc58fc54b60f5e93ed93b4c (diff)
Add latest changes from gitlab-org/gitlab@14-3-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210826145509_add_function_for_inserting_deleted_records.rb2
-rw-r--r--db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb5
2 files changed, 6 insertions, 1 deletions
diff --git a/db/migrate/20210826145509_add_function_for_inserting_deleted_records.rb b/db/migrate/20210826145509_add_function_for_inserting_deleted_records.rb
index ef688cdfd8c..631cc27c8c0 100644
--- a/db/migrate/20210826145509_add_function_for_inserting_deleted_records.rb
+++ b/db/migrate/20210826145509_add_function_for_inserting_deleted_records.rb
@@ -6,7 +6,7 @@ class AddFunctionForInsertingDeletedRecords < ActiveRecord::Migration[6.1]
def up
execute(<<~SQL)
- CREATE FUNCTION #{DELETED_RECORDS_INSERT_FUNCTION_NAME}()
+ CREATE OR REPLACE FUNCTION #{DELETED_RECORDS_INSERT_FUNCTION_NAME}()
RETURNS TRIGGER AS
$$
BEGIN
diff --git a/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb b/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb
index 872eef5fd31..02f98833703 100644
--- a/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb
+++ b/db/post_migrate/20210907211557_finalize_ci_builds_bigint_conversion.rb
@@ -103,6 +103,11 @@ class FinalizeCiBuildsBigintConversion < Gitlab::Database::Migration[1.0]
remove_foreign_key(:ci_resources, TABLE_NAME, column: :build_id, name: 'fk_rails_e169a8e3d5')
end
+ # Remove this unexpected FK if it exists - https://gitlab.com/gitlab-org/gitlab/-/issues/341822
+ if foreign_key_exists?(:ci_sources_pipelines, TABLE_NAME, column: :source_job_id, name: 'fk_3f0c88d7dc')
+ remove_foreign_key(:ci_sources_pipelines, TABLE_NAME, column: :source_job_id, name: 'fk_3f0c88d7dc')
+ end
+
swap_columns
end