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
Boxiang Sun
gitlab-ce
Commits
cc331684
Commit
cc331684
authored
Jul 30, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add indicies to labels
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
6ac26a3c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
db/migrate/20140730111702_add_index_to_labels.rb
db/migrate/20140730111702_add_index_to_labels.rb
+7
-0
db/schema.rb
db/schema.rb
+6
-1
No files found.
db/migrate/20140730111702_add_index_to_labels.rb
0 → 100644
View file @
cc331684
class
AddIndexToLabels
<
ActiveRecord
::
Migration
def
change
add_index
"labels"
,
:project_id
add_index
"label_links"
,
:label_id
add_index
"label_links"
,
[
:target_id
,
:target_type
]
end
end
db/schema.rb
View file @
cc331684
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
# It's strongly recommended that you check this file into your version control system.
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
201407
29152420
)
do
ActiveRecord
::
Schema
.
define
(
version:
201407
30111702
)
do
# These are extensions that must be enabled in order to support this database
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
enable_extension
"plpgsql"
...
@@ -117,6 +117,9 @@ ActiveRecord::Schema.define(version: 20140729152420) do
...
@@ -117,6 +117,9 @@ ActiveRecord::Schema.define(version: 20140729152420) do
t
.
datetime
"updated_at"
t
.
datetime
"updated_at"
end
end
add_index
"label_links"
,
[
"label_id"
],
name:
"index_label_links_on_label_id"
,
using: :btree
add_index
"label_links"
,
[
"target_id"
,
"target_type"
],
name:
"index_label_links_on_target_id_and_target_type"
,
using: :btree
create_table
"labels"
,
force:
true
do
|
t
|
create_table
"labels"
,
force:
true
do
|
t
|
t
.
string
"title"
t
.
string
"title"
t
.
string
"color"
t
.
string
"color"
...
@@ -125,6 +128,8 @@ ActiveRecord::Schema.define(version: 20140729152420) do
...
@@ -125,6 +128,8 @@ ActiveRecord::Schema.define(version: 20140729152420) do
t
.
datetime
"updated_at"
t
.
datetime
"updated_at"
end
end
add_index
"labels"
,
[
"project_id"
],
name:
"index_labels_on_project_id"
,
using: :btree
create_table
"merge_request_diffs"
,
force:
true
do
|
t
|
create_table
"merge_request_diffs"
,
force:
true
do
|
t
|
t
.
string
"state"
t
.
string
"state"
t
.
text
"st_commits"
t
.
text
"st_commits"
...
...
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