summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-03 12:09:03 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-03 12:09:03 +0000
commit53ea1228bef63279e558b08b50144775f6f3a4c4 (patch)
treeec6534ce84a6451a67f1c34257064e1aa624b717 /db/migrate
parent764ff99273496e7d1da0dc9cc2255445cf7dc540 (diff)
downloadgitlab-ce-53ea1228bef63279e558b08b50144775f6f3a4c4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20210824055322_add_project_namespace_id_to_project.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/db/migrate/20210824055322_add_project_namespace_id_to_project.rb b/db/migrate/20210824055322_add_project_namespace_id_to_project.rb
new file mode 100644
index 00000000000..9397ad4aab2
--- /dev/null
+++ b/db/migrate/20210824055322_add_project_namespace_id_to_project.rb
@@ -0,0 +1,21 @@
+# frozen_string_literal: true
+
+class AddProjectNamespaceIdToProject < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ # This is being added to Projects as a replacement for Namespace
+ # See https://gitlab.com/gitlab-org/gitlab/-/issues/337099
+ add_column :projects, :project_namespace_id, :bigint # rubocop: disable Migration/AddColumnsToWideTables
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :projects, :project_namespace_id
+ end
+ end
+end