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
a91999e4
Commit
a91999e4
authored
Jun 02, 2018
by
Jasper Maes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rails5 Fix arel from
parent
f8bd8f4f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
changelogs/unreleased/rails5-fix-46281.yml
changelogs/unreleased/rails5-fix-46281.yml
+5
-0
lib/gitlab/database/median.rb
lib/gitlab/database/median.rb
+7
-2
No files found.
changelogs/unreleased/rails5-fix-46281.yml
0 → 100644
View file @
a91999e4
---
title
:
Rails5 fix arel from
merge_request
:
19340
author
:
Jasper Maes
type
:
fixed
lib/gitlab/database/median.rb
View file @
a91999e4
...
...
@@ -143,8 +143,13 @@ module Gitlab
.
order
(
arel_table
[
column_sym
])
).
as
(
'row_id'
)
count
=
arel_table
.
from
(
arel_table
.
alias
)
.
project
(
'COUNT(*)'
)
arel_from
=
if
Gitlab
.
rails5?
arel_table
.
from
.
from
(
arel_table
.
alias
)
else
arel_table
.
from
(
arel_table
.
alias
)
end
count
=
arel_from
.
project
(
'COUNT(*)'
)
.
where
(
arel_table
[
partition_column
].
eq
(
arel_table
.
alias
[
partition_column
]))
.
as
(
'ct'
)
...
...
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