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
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
rails5-fix-46281.yml
changelogs/unreleased/rails5-fix-46281.yml
+5
-0
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