Не подтверждена Коммит 13837fb8 создал по автору Andreas Brandl's avatar Andreas Brandl
Просмотр файлов

Partial index for namespaces.type

Relates to https://gitlab.com/gitlab-org/gitlab-ce/issues/66956
владелец 0844ec02
---
title: Partial index for namespaces.type
merge_request: 32876
author:
type: performance
# frozen_string_literal: true
class ExcludeNullsFromIndexOnNamespacesType < ActiveRecord::Migration[5.2]
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index(:namespaces, :type, where: 'type is not null', name: 'index_namespaces_on_type_partial')
remove_concurrent_index_by_name(:namespaces, 'index_namespaces_on_type')
end
def down
add_concurrent_index(:namespaces, :type, name: 'index_namespaces_on_type')
remove_concurrent_index_by_name(:namespaces, 'index_namespaces_on_type_partial')
end
end
......@@ -2291,7 +2291,7 @@
t.index ["runners_token_encrypted"], name: "index_namespaces_on_runners_token_encrypted", unique: true
t.index ["shared_runners_minutes_limit", "extra_shared_runners_minutes_limit"], name: "index_namespaces_on_shared_and_extra_runners_minutes_limit"
t.index ["trial_ends_on"], name: "index_namespaces_on_trial_ends_on", where: "(trial_ends_on IS NOT NULL)"
t.index ["type"], name: "index_namespaces_on_type"
t.index ["type"], name: "index_namespaces_on_type_partial", where: "(type IS NOT NULL)"
end
create_table "note_diff_files", id: :serial, force: :cascade do |t|
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать