BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
c46a0612
Commit
c46a0612
authored
Apr 16, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add uniq db index on project_id+iid
parent
2a99f184
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
20140416074002_add_index_on_iid.rb
db/migrate/20140416074002_add_index_on_iid.rb
+7
-0
schema.rb
db/schema.rb
+3
-0
No files found.
db/migrate/20140416074002_add_index_on_iid.rb
0 → 100644
View file @
c46a0612
class
AddIndexOnIid
<
ActiveRecord
::
Migration
def
change
add_index
:issues
,
[
:project_id
,
:iid
],
unique:
true
add_index
:merge_requests
,
[
:target_project_id
,
:iid
],
unique:
true
add_index
:milestones
,
[
:project_id
,
:iid
],
unique:
true
end
end
db/schema.rb
View file @
c46a0612
...
...
@@ -93,6 +93,7 @@ ActiveRecord::Schema.define(version: 20140416185734) do
add_index
"issues"
,
[
"author_id"
],
name:
"index_issues_on_author_id"
,
using: :btree
add_index
"issues"
,
[
"created_at"
],
name:
"index_issues_on_created_at"
,
using: :btree
add_index
"issues"
,
[
"milestone_id"
],
name:
"index_issues_on_milestone_id"
,
using: :btree
add_index
"issues"
,
[
"project_id"
,
"iid"
],
name:
"index_issues_on_project_id_and_iid"
,
unique:
true
,
using: :btree
add_index
"issues"
,
[
"project_id"
],
name:
"index_issues_on_project_id"
,
using: :btree
add_index
"issues"
,
[
"title"
],
name:
"index_issues_on_title"
,
using: :btree
...
...
@@ -143,6 +144,7 @@ ActiveRecord::Schema.define(version: 20140416185734) do
add_index
"merge_requests"
,
[
"source_branch"
],
name:
"index_merge_requests_on_source_branch"
,
using: :btree
add_index
"merge_requests"
,
[
"source_project_id"
],
name:
"index_merge_requests_on_source_project_id"
,
using: :btree
add_index
"merge_requests"
,
[
"target_branch"
],
name:
"index_merge_requests_on_target_branch"
,
using: :btree
add_index
"merge_requests"
,
[
"target_project_id"
,
"iid"
],
name:
"index_merge_requests_on_target_project_id_and_iid"
,
unique:
true
,
using: :btree
add_index
"merge_requests"
,
[
"title"
],
name:
"index_merge_requests_on_title"
,
using: :btree
create_table
"milestones"
,
force:
true
do
|
t
|
...
...
@@ -157,6 +159,7 @@ ActiveRecord::Schema.define(version: 20140416185734) do
end
add_index
"milestones"
,
[
"due_date"
],
name:
"index_milestones_on_due_date"
,
using: :btree
add_index
"milestones"
,
[
"project_id"
,
"iid"
],
name:
"index_milestones_on_project_id_and_iid"
,
unique:
true
,
using: :btree
add_index
"milestones"
,
[
"project_id"
],
name:
"index_milestones_on_project_id"
,
using: :btree
create_table
"namespaces"
,
force:
true
do
|
t
|
...
...
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