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
Léo-Paul Géneau
gitlab-ce
Commits
0e8b9c4a
Commit
0e8b9c4a
authored
Dec 06, 2018
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change to partial index
parent
ec2c268b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
db/migrate/20181120091639_add_foreign_key_to_ci_pipelines_merge_requests.rb
...0091639_add_foreign_key_to_ci_pipelines_merge_requests.rb
+2
-2
db/schema.rb
db/schema.rb
+1
-1
No files found.
db/migrate/20181120091639_add_foreign_key_to_ci_pipelines_merge_requests.rb
View file @
0e8b9c4a
...
...
@@ -8,7 +8,7 @@ class AddForeignKeyToCiPipelinesMergeRequests < ActiveRecord::Migration
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_pipelines
,
:merge_request_id
add_concurrent_index
:ci_pipelines
,
:merge_request_id
,
where:
'merge_request_id IS NOT NULL'
add_concurrent_foreign_key
:ci_pipelines
,
:merge_requests
,
column: :merge_request_id
,
on_delete: :cascade
end
...
...
@@ -17,6 +17,6 @@ class AddForeignKeyToCiPipelinesMergeRequests < ActiveRecord::Migration
remove_foreign_key
:ci_pipelines
,
:merge_requests
end
remove_concurrent_index
:ci_pipelines
,
:merge_request_id
remove_concurrent_index
:ci_pipelines
,
:merge_request_id
,
where:
'merge_request_id IS NOT NULL'
end
end
db/schema.rb
View file @
0e8b9c4a
...
...
@@ -476,7 +476,7 @@ ActiveRecord::Schema.define(version: 20181126153547) do
t
.
integer
"iid"
t
.
integer
"merge_request_id"
t
.
index
[
"auto_canceled_by_id"
],
name:
"index_ci_pipelines_on_auto_canceled_by_id"
,
using: :btree
t
.
index
[
"merge_request_id"
],
name:
"index_ci_pipelines_on_merge_request_id"
,
using: :btree
t
.
index
[
"merge_request_id"
],
name:
"index_ci_pipelines_on_merge_request_id"
,
where:
"(merge_request_id IS NOT NULL)"
,
using: :btree
t
.
index
[
"pipeline_schedule_id"
],
name:
"index_ci_pipelines_on_pipeline_schedule_id"
,
using: :btree
t
.
index
[
"project_id"
,
"iid"
],
name:
"index_ci_pipelines_on_project_id_and_iid"
,
unique:
true
,
where:
"(iid IS NOT NULL)"
,
using: :btree
t
.
index
[
"project_id"
,
"ref"
,
"status"
,
"id"
],
name:
"index_ci_pipelines_on_project_id_and_ref_and_status_and_id"
,
using: :btree
...
...
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