diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-18 09:45:46 +0000 |
commit | a7b3560714b4d9cc4ab32dffcd1f74a284b93580 (patch) | |
tree | 7452bd5c3545c2fa67a28aa013835fb4fa071baf /db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb | |
parent | ee9173579ae56a3dbfe5afe9f9410c65bb327ca7 (diff) | |
download | gitlab-ce-a7b3560714b4d9cc4ab32dffcd1f74a284b93580.tar.gz |
Add latest changes from gitlab-org/gitlab@14-8-stable-eev14.8.0-rc42
Diffstat (limited to 'db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb')
-rw-r--r-- | db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb b/db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb new file mode 100644 index 00000000000..b999c871a3e --- /dev/null +++ b/db/migrate/20220202034409_add_tmp_index_on_id_and_migration_state_to_container_repositories.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +class AddTmpIndexOnIdAndMigrationStateToContainerRepositories < Gitlab::Database::Migration[1.0] + INDEX_NAME = 'tmp_index_container_repositories_on_id_migration_state' + + disable_ddl_transaction! + + # Temporary index to be removed https://gitlab.com/gitlab-org/gitlab/-/issues/351783 + def up + add_concurrent_index :container_repositories, [:id, :migration_state], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :container_repositories, INDEX_NAME + end +end |