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
a015e922
Commit
a015e922
authored
Nov 01, 2019
by
Pavel Shutsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace Productivity analytics merged_at index
parent
c6f8105a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
2 deletions
+21
-2
db/migrate/20191101092917_replace_index_on_metrics_merged_at.rb
...rate/20191101092917_replace_index_on_metrics_merged_at.rb
+19
-0
db/post_migrate/20190918104222_schedule_productivity_analytics_backfill.rb
...0190918104222_schedule_productivity_analytics_backfill.rb
+1
-1
db/schema.rb
db/schema.rb
+1
-1
No files found.
db/migrate/20191101092917_replace_index_on_metrics_merged_at.rb
0 → 100644
View file @
a015e922
# frozen_string_literal: true
class
ReplaceIndexOnMetricsMergedAt
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:merge_request_metrics
,
:merged_at
remove_concurrent_index
:merge_request_metrics
,
[
:merged_at
,
:id
]
end
def
down
add_concurrent_index
:merge_request_metrics
,
[
:merged_at
,
:id
]
remove_concurrent_index
:merge_request_metrics
,
:merged_at
end
end
db/post_migrate/20190918104222_schedule_productivity_analytics_backfill.rb
View file @
a015e922
...
...
@@ -6,7 +6,7 @@ class ScheduleProductivityAnalyticsBackfill < ActiveRecord::Migration[5.2]
DOWNTIME
=
false
def
up
# no-op since the
scheduling times out on GitLab.com
# no-op since the
migration was removed
end
def
down
...
...
db/schema.rb
View file @
a015e922
...
...
@@ -2290,7 +2290,7 @@ ActiveRecord::Schema.define(version: 2019_11_05_094625) do
t
.
index
[
"latest_closed_by_id"
],
name:
"index_merge_request_metrics_on_latest_closed_by_id"
t
.
index
[
"merge_request_id"
,
"merged_at"
],
name:
"index_merge_request_metrics_on_merge_request_id_and_merged_at"
,
where:
"(merged_at IS NOT NULL)"
t
.
index
[
"merge_request_id"
],
name:
"index_merge_request_metrics"
t
.
index
[
"merged_at"
,
"id"
],
name:
"index_merge_request_metrics_on_merged_at_and_id
"
t
.
index
[
"merged_at"
],
name:
"index_merge_request_metrics_on_merged_at
"
t
.
index
[
"merged_by_id"
],
name:
"index_merge_request_metrics_on_merged_by_id"
t
.
index
[
"pipeline_id"
],
name:
"index_merge_request_metrics_on_pipeline_id"
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