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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
dc15abaa
Commit
dc15abaa
authored
Mar 30, 2017
by
mhasbini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary ORDER BY clause from `forked_to_project_id` subquery
parent
26ba13f2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
app/models/user.rb
app/models/user.rb
+4
-2
changelogs/unreleased/forked-subquery-order.yml
changelogs/unreleased/forked-subquery-order.yml
+4
-0
No files found.
app/models/user.rb
View file @
dc15abaa
...
...
@@ -635,8 +635,10 @@ class User < ActiveRecord::Base
end
def
fork_of
(
project
)
links
=
ForkedProjectLink
.
where
(
forked_from_project_id:
project
,
forked_to_project_id:
personal_projects
)
links
=
ForkedProjectLink
.
where
(
forked_from_project_id:
project
,
forked_to_project_id:
personal_projects
.
unscope
(
:order
)
)
if
links
.
any?
links
.
first
.
forked_to_project
else
...
...
changelogs/unreleased/forked-subquery-order.yml
0 → 100644
View file @
dc15abaa
---
title
:
Remove unnecessary ORDER BY clause from `forked_to_project_id` subquery
merge_request
:
author
:
mhasbini
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