Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kazuhiko Shiozaki
gitlab-ce
Commits
9787c37a
Commit
9787c37a
authored
Jun 22, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More db index
parent
ee13297a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
1 deletion
+24
-1
db/migrate/20130622115340_add_more_db_index.rb
db/migrate/20130622115340_add_more_db_index.rb
+12
-0
db/schema.rb
db/schema.rb
+12
-1
No files found.
db/migrate/20130622115340_add_more_db_index.rb
0 → 100644
View file @
9787c37a
class
AddMoreDbIndex
<
ActiveRecord
::
Migration
def
change
add_index
:deploy_keys_projects
,
:project_id
add_index
:web_hooks
,
:project_id
add_index
:protected_branches
,
:project_id
add_index
:users_groups
,
:user_id
add_index
:snippets
,
:author_id
add_index
:notes
,
:author_id
add_index
:notes
,
[
:noteable_id
,
:noteable_type
]
end
end
db/schema.rb
View file @
9787c37a
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
:version
=>
2013062
1195223
)
do
ActiveRecord
::
Schema
.
define
(
:version
=>
2013062
2115340
)
do
create_table
"deploy_keys_projects"
,
:force
=>
true
do
|
t
|
t
.
integer
"deploy_key_id"
,
:null
=>
false
...
...
@@ -20,6 +20,8 @@ ActiveRecord::Schema.define(:version => 20130621195223) do
t
.
datetime
"updated_at"
,
:null
=>
false
end
add_index
"deploy_keys_projects"
,
[
"project_id"
],
:name
=>
"index_deploy_keys_projects_on_project_id"
create_table
"events"
,
:force
=>
true
do
|
t
|
t
.
string
"target_type"
t
.
integer
"target_id"
...
...
@@ -148,8 +150,10 @@ ActiveRecord::Schema.define(:version => 20130621195223) do
t
.
integer
"noteable_id"
end
add_index
"notes"
,
[
"author_id"
],
:name
=>
"index_notes_on_author_id"
add_index
"notes"
,
[
"commit_id"
],
:name
=>
"index_notes_on_commit_id"
add_index
"notes"
,
[
"created_at"
],
:name
=>
"index_notes_on_created_at"
add_index
"notes"
,
[
"noteable_id"
,
"noteable_type"
],
:name
=>
"index_notes_on_noteable_id_and_noteable_type"
add_index
"notes"
,
[
"noteable_type"
],
:name
=>
"index_notes_on_noteable_type"
add_index
"notes"
,
[
"project_id"
,
"noteable_type"
],
:name
=>
"index_notes_on_project_id_and_noteable_type"
add_index
"notes"
,
[
"project_id"
],
:name
=>
"index_notes_on_project_id"
...
...
@@ -186,6 +190,8 @@ ActiveRecord::Schema.define(:version => 20130621195223) do
t
.
datetime
"updated_at"
,
:null
=>
false
end
add_index
"protected_branches"
,
[
"project_id"
],
:name
=>
"index_protected_branches_on_project_id"
create_table
"services"
,
:force
=>
true
do
|
t
|
t
.
string
"type"
t
.
string
"title"
...
...
@@ -214,6 +220,7 @@ ActiveRecord::Schema.define(:version => 20130621195223) do
t
.
string
"type"
end
add_index
"snippets"
,
[
"author_id"
],
:name
=>
"index_snippets_on_author_id"
add_index
"snippets"
,
[
"created_at"
],
:name
=>
"index_snippets_on_created_at"
add_index
"snippets"
,
[
"expires_at"
],
:name
=>
"index_snippets_on_expires_at"
add_index
"snippets"
,
[
"project_id"
],
:name
=>
"index_snippets_on_project_id"
...
...
@@ -310,6 +317,8 @@ ActiveRecord::Schema.define(:version => 20130621195223) do
t
.
integer
"notification_level"
,
:default
=>
3
,
:null
=>
false
end
add_index
"users_groups"
,
[
"user_id"
],
:name
=>
"index_users_groups_on_user_id"
create_table
"users_projects"
,
:force
=>
true
do
|
t
|
t
.
integer
"user_id"
,
:null
=>
false
t
.
integer
"project_id"
,
:null
=>
false
...
...
@@ -332,4 +341,6 @@ ActiveRecord::Schema.define(:version => 20130621195223) do
t
.
integer
"service_id"
end
add_index
"web_hooks"
,
[
"project_id"
],
:name
=>
"index_web_hooks_on_project_id"
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment