Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
13837fb8
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
13837fb8
编写于
9月 10, 2019
作者:
A
Andreas Brandl
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Partial index for namespaces.type
Relates to
https://gitlab.com/gitlab-org/gitlab-ce/issues/66956
上级
0844ec02
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
26 addition
and
1 deletion
+26
-1
changelogs/unreleased/ab-partial-index-for-namespaces-type.yml
...elogs/unreleased/ab-partial-index-for-namespaces-type.yml
+5
-0
db/migrate/20190910114843_exclude_nulls_from_index_on_namespaces_type.rb
...0910114843_exclude_nulls_from_index_on_namespaces_type.rb
+20
-0
db/schema.rb
db/schema.rb
+1
-1
未找到文件。
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 @@ ActiveRecord::Schema.define(version: 2019_09_12_061145) do
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
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录