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
508b26b3
Commit
508b26b3
authored
Apr 08, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
4a24c0af
225edb0d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
lib/gitlab/background_migration/migrate_stage_index.rb
lib/gitlab/background_migration/migrate_stage_index.rb
+2
-2
spec/lib/gitlab/background_migration/migrate_stage_index_spec.rb
...b/gitlab/background_migration/migrate_stage_index_spec.rb
+1
-1
No files found.
lib/gitlab/background_migration/migrate_stage_index.rb
View file @
508b26b3
...
@@ -21,8 +21,8 @@ module Gitlab
...
@@ -21,8 +21,8 @@ module Gitlab
AND stage_idx IS NOT NULL
AND stage_idx IS NOT NULL
GROUP BY stage_id, stage_idx
GROUP BY stage_id, stage_idx
), indexes AS (
), indexes AS (
SELECT DISTINCT stage_id,
la
st_value(stage_idx)
SELECT DISTINCT stage_id,
fir
st_value(stage_idx)
OVER (PARTITION BY stage_id ORDER BY freq
A
SC) AS index
OVER (PARTITION BY stage_id ORDER BY freq
DE
SC) AS index
FROM freqs
FROM freqs
)
)
...
...
spec/lib/gitlab/background_migration/migrate_stage_index_spec.rb
View file @
508b26b3
...
@@ -30,6 +30,6 @@ describe Gitlab::BackgroundMigration::MigrateStageIndex, :migration, schema: 201
...
@@ -30,6 +30,6 @@ describe Gitlab::BackgroundMigration::MigrateStageIndex, :migration, schema: 201
described_class
.
new
.
perform
(
100
,
101
)
described_class
.
new
.
perform
(
100
,
101
)
expect
(
stages
.
all
.
pluck
(
:position
)).
to
eq
[
2
,
3
]
expect
(
stages
.
all
.
order
(
:id
).
pluck
(
:position
)).
to
eq
[
2
,
3
]
end
end
end
end
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