Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
7b97e304
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,体验更适合开发者的 AI 搜索 >>
提交
7b97e304
编写于
12月 03, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
More indices for asscociations. related to #2159
上级
8dec24a3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
47 addition
and
1 deletion
+47
-1
db/migrate/20121203160507_more_indices.rb
db/migrate/20121203160507_more_indices.rb
+26
-0
db/schema.rb
db/schema.rb
+21
-1
未找到文件。
db/migrate/20121203160507_more_indices.rb
0 → 100644
浏览文件 @
7b97e304
class
MoreIndices
<
ActiveRecord
::
Migration
def
change
add_index
:notes
,
:project_id
add_index
:namespaces
,
:owner_id
add_index
:keys
,
:user_id
add_index
:projects
,
:namespace_id
add_index
:projects
,
:owner_id
add_index
:services
,
:project_id
add_index
:snippets
,
:project_id
add_index
:users_projects
,
:project_id
# Issues
add_index
:issues
,
:assignee_id
add_index
:issues
,
:milestone_id
add_index
:issues
,
:author_id
# Merge Requests
add_index
:merge_requests
,
:assignee_id
add_index
:merge_requests
,
:milestone_id
add_index
:merge_requests
,
:author_id
end
end
db/schema.rb
浏览文件 @
7b97e304
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
201212031
54450
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
201212031
60507
)
do
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
...
...
@@ -44,6 +44,9 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
integer
"milestone_id"
end
add_index
"issues"
,
[
"assignee_id"
],
:name
=>
"index_issues_on_assignee_id"
add_index
"issues"
,
[
"author_id"
],
:name
=>
"index_issues_on_author_id"
add_index
"issues"
,
[
"milestone_id"
],
:name
=>
"index_issues_on_milestone_id"
add_index
"issues"
,
[
"project_id"
],
:name
=>
"index_issues_on_project_id"
create_table
"keys"
,
:force
=>
true
do
|
t
|
...
...
@@ -56,6 +59,8 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
integer
"project_id"
end
add_index
"keys"
,
[
"user_id"
],
:name
=>
"index_keys_on_user_id"
create_table
"merge_requests"
,
:force
=>
true
do
|
t
|
t
.
string
"target_branch"
,
:null
=>
false
t
.
string
"source_branch"
,
:null
=>
false
...
...
@@ -73,6 +78,9 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
integer
"milestone_id"
end
add_index
"merge_requests"
,
[
"assignee_id"
],
:name
=>
"index_merge_requests_on_assignee_id"
add_index
"merge_requests"
,
[
"author_id"
],
:name
=>
"index_merge_requests_on_author_id"
add_index
"merge_requests"
,
[
"milestone_id"
],
:name
=>
"index_merge_requests_on_milestone_id"
add_index
"merge_requests"
,
[
"project_id"
],
:name
=>
"index_merge_requests_on_project_id"
create_table
"milestones"
,
:force
=>
true
do
|
t
|
...
...
@@ -94,6 +102,8 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
string
"type"
end
add_index
"namespaces"
,
[
"owner_id"
],
:name
=>
"index_namespaces_on_owner_id"
create_table
"notes"
,
:force
=>
true
do
|
t
|
t
.
text
"note"
t
.
string
"noteable_id"
...
...
@@ -108,6 +118,7 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
add_index
"notes"
,
[
"noteable_id"
],
:name
=>
"index_notes_on_noteable_id"
add_index
"notes"
,
[
"noteable_type"
],
:name
=>
"index_notes_on_noteable_type"
add_index
"notes"
,
[
"project_id"
],
:name
=>
"index_notes_on_project_id"
create_table
"projects"
,
:force
=>
true
do
|
t
|
t
.
string
"name"
...
...
@@ -125,6 +136,9 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
integer
"namespace_id"
end
add_index
"projects"
,
[
"namespace_id"
],
:name
=>
"index_projects_on_namespace_id"
add_index
"projects"
,
[
"owner_id"
],
:name
=>
"index_projects_on_owner_id"
create_table
"protected_branches"
,
:force
=>
true
do
|
t
|
t
.
integer
"project_id"
,
:null
=>
false
t
.
string
"name"
,
:null
=>
false
...
...
@@ -143,6 +157,8 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
string
"project_url"
end
add_index
"services"
,
[
"project_id"
],
:name
=>
"index_services_on_project_id"
create_table
"snippets"
,
:force
=>
true
do
|
t
|
t
.
string
"title"
t
.
text
"content"
...
...
@@ -154,6 +170,8 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
datetime
"expires_at"
end
add_index
"snippets"
,
[
"project_id"
],
:name
=>
"index_snippets_on_project_id"
create_table
"taggings"
,
:force
=>
true
do
|
t
|
t
.
integer
"tag_id"
t
.
integer
"taggable_id"
...
...
@@ -214,6 +232,8 @@ ActiveRecord::Schema.define(:version => 20121203154450) do
t
.
integer
"project_access"
,
:default
=>
0
,
:null
=>
false
end
add_index
"users_projects"
,
[
"project_id"
],
:name
=>
"index_users_projects_on_project_id"
create_table
"web_hooks"
,
:force
=>
true
do
|
t
|
t
.
string
"url"
t
.
integer
"project_id"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录