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
7c510720
Commit
7c510720
authored
Jul 07, 2020
by
Adam Hegyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove non-unique index on MR metrics
parent
1e691756
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
2 deletions
+24
-2
changelogs/unreleased/drop-old-non-unique-index-on-mr-metrics.yml
...gs/unreleased/drop-old-non-unique-index-on-mr-metrics.yml
+5
-0
db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb
...20200707071941_drop_old_non_unique_index_on_mr_metrics.rb
+18
-0
db/structure.sql
db/structure.sql
+1
-2
No files found.
changelogs/unreleased/drop-old-non-unique-index-on-mr-metrics.yml
0 → 100644
View file @
7c510720
---
title
:
Remove non-unique index on `merge_request_metrics.merge_request_id` column
merge_request
:
36170
author
:
type
:
changed
db/migrate/20200707071941_drop_old_non_unique_index_on_mr_metrics.rb
0 → 100644
View file @
7c510720
# frozen_string_literal: true
class
DropOldNonUniqueIndexOnMrMetrics
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_merge_request_metrics'
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
(
:merge_request_metrics
,
INDEX_NAME
)
end
def
down
add_concurrent_index
:merge_request_metrics
,
:merge_request_id
,
name:
INDEX_NAME
end
end
db/structure.sql
View file @
7c510720
...
@@ -19437,8 +19437,6 @@ CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON public.merg
...
@@ -19437,8 +19437,6 @@ CREATE INDEX index_merge_request_diffs_on_merge_request_id_and_id ON public.merg
CREATE
INDEX
index_merge_request_diffs_on_merge_request_id_and_id_partial
ON
public
.
merge_request_diffs
USING
btree
(
merge_request_id
,
id
)
WHERE
((
NOT
stored_externally
)
OR
(
stored_externally
IS
NULL
));
CREATE
INDEX
index_merge_request_diffs_on_merge_request_id_and_id_partial
ON
public
.
merge_request_diffs
USING
btree
(
merge_request_id
,
id
)
WHERE
((
NOT
stored_externally
)
OR
(
stored_externally
IS
NULL
));
CREATE
INDEX
index_merge_request_metrics
ON
public
.
merge_request_metrics
USING
btree
(
merge_request_id
);
CREATE
INDEX
index_merge_request_metrics_on_first_deployed_to_production_at
ON
public
.
merge_request_metrics
USING
btree
(
first_deployed_to_production_at
);
CREATE
INDEX
index_merge_request_metrics_on_first_deployed_to_production_at
ON
public
.
merge_request_metrics
USING
btree
(
first_deployed_to_production_at
);
CREATE
INDEX
index_merge_request_metrics_on_latest_closed_at
ON
public
.
merge_request_metrics
USING
btree
(
latest_closed_at
)
WHERE
(
latest_closed_at
IS
NOT
NULL
);
CREATE
INDEX
index_merge_request_metrics_on_latest_closed_at
ON
public
.
merge_request_metrics
USING
btree
(
latest_closed_at
)
WHERE
(
latest_closed_at
IS
NOT
NULL
);
...
@@ -23582,5 +23580,6 @@ COPY "schema_migrations" (version) FROM STDIN;
...
@@ -23582,5 +23580,6 @@ COPY "schema_migrations" (version) FROM STDIN;
20200704143633
20200704143633
20200706005325
20200706005325
20200706170536
20200706170536
20200707071941
\
.
\
.
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