Открыть боковую панель
nt_test121
nt_project_9da4a5yt9x4b
Коммиты
13837fb8
Не подтверждена
Коммит
13837fb8
создал
Сен 10, 2019
по автору
Andreas Brandl
Просмотр файлов
Partial index for namespaces.type
Relates to
https://gitlab.com/gitlab-org/gitlab-ce/issues/66956
владелец
0844ec02
Изменения
3
Скрыть пробелы
Построчно
Рядом
changelogs/unreleased/ab-partial-index-for-namespaces-type.yml
0 → 100644
Просмотр файла @
13837fb8
---
title
:
Partial index for namespaces.type
merge_request
:
32876
author
:
type
:
performance
db/migrate/20190910114843_exclude_nulls_from_index_on_namespaces_type.rb
0 → 100644
Просмотр файла @
13837fb8
# 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
db/schema.rb
Просмотр файла @
13837fb8
...
...
@@ -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.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать