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/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb')
-rw-r--r--db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb b/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb
new file mode 100644
index 00000000000..f2772389d02
--- /dev/null
+++ b/db/post_migrate/20211018101852_add_fk_to_tmp_project_id_column_on_namespaces_table.rb
@@ -0,0 +1,13 @@
+# frozen_string_literal: true
+
+class AddFkToTmpProjectIdColumnOnNamespacesTable < Gitlab::Database::Migration[1.0]
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key :namespaces, :projects, column: :tmp_project_id
+ end
+
+ def down
+ remove_foreign_key :namespaces, column: :tmp_project_id
+ end
+end