diff options
Diffstat (limited to 'db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb')
-rw-r--r-- | db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb b/db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb new file mode 100644 index 00000000000..ee59e72e398 --- /dev/null +++ b/db/migrate/20210401134455_remove_index_mirror_data_on_next_execution_and_retry_count.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# See https://docs.gitlab.com/ee/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class RemoveIndexMirrorDataOnNextExecutionAndRetryCount < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + disable_ddl_transaction! + + DOWNTIME = false + + INDEX_NAME = 'index_mirror_data_on_next_execution_and_retry_count' + + def up + remove_concurrent_index( + :project_mirror_data, + %i[next_execution_timestamp retry_count], + name: INDEX_NAME + ) + end + + def down + add_concurrent_index( + :project_mirror_data, + %i[next_execution_timestamp retry_count], + name: INDEX_NAME + ) + end +end |