diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) | |
download | gitlab-ce-d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb.tar.gz |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb')
-rw-r--r-- | db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb b/db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb new file mode 100644 index 00000000000..531410a91d9 --- /dev/null +++ b/db/post_migrate/20210923135909_remove_delayed_project_removal_from_namespaces.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveDelayedProjectRemovalFromNamespaces < Gitlab::Database::Migration[1.0] + disable_ddl_transaction! + + def up + with_lock_retries do + remove_column :namespaces, :delayed_project_removal + end + end + + def down + with_lock_retries do + add_column :namespaces, :delayed_project_removal, :boolean, default: false, null: false, if_not_exists: true # rubocop:disable Migration/AddColumnsToWideTables + end + + add_concurrent_index :namespaces, :id, name: 'tmp_idx_on_namespaces_delayed_project_removal', where: 'delayed_project_removal = TRUE' + end +end |