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
d306b2f6
Commit
d306b2f6
authored
Sep 23, 2020
by
can eldem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused index for broken location fingerprints
parent
8c07a909
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
changelogs/unreleased/remove-tmp-index.yml
changelogs/unreleased/remove-tmp-index.yml
+5
-0
db/migrate/20200923130057_remove_tmp_container_scanning_index.rb
...ate/20200923130057_remove_tmp_container_scanning_index.rb
+20
-0
db/schema_migrations/20200923130057
db/schema_migrations/20200923130057
+1
-0
db/structure.sql
db/structure.sql
+0
-2
No files found.
changelogs/unreleased/remove-tmp-index.yml
0 → 100644
View file @
d306b2f6
---
title
:
Remove temporary index for fixing broken CS fingerprints
merge_request
:
43126
author
:
type
:
other
db/migrate/20200923130057_remove_tmp_container_scanning_index.rb
0 → 100644
View file @
d306b2f6
# frozen_string_literal: true
class
RemoveTmpContainerScanningIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'tmp_index_for_fixing_inconsistent_vulnerability_occurrences'
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
(
:vulnerability_occurrences
,
INDEX_NAME
)
end
def
down
# report_type: 2 container scanning
add_concurrent_index
(
:vulnerability_occurrences
,
:id
,
where:
"LENGTH(location_fingerprint) = 40 AND report_type = 2"
,
name:
INDEX_NAME
)
end
end
db/schema_migrations/20200923130057
0 → 100644
View file @
d306b2f6
84b272d61f6ab6e9f9f8eb059ba139a3fa0d2f1bbeb337f2e4e7cd4034822b44
\ No newline at end of file
db/structure.sql
View file @
d306b2f6
...
...
@@ -21576,8 +21576,6 @@ CREATE INDEX tmp_build_stage_position_index ON ci_builds USING btree (stage_id,
CREATE
INDEX
tmp_index_for_email_unconfirmation_migration
ON
emails
USING
btree
(
id
)
WHERE
(
confirmed_at
IS
NOT
NULL
);
CREATE
INDEX
tmp_index_for_fixing_inconsistent_vulnerability_occurrences
ON
vulnerability_occurrences
USING
btree
(
id
)
WHERE
((
length
(
location_fingerprint
)
=
40
)
AND
(
report_type
=
2
));
CREATE
UNIQUE
INDEX
unique_merge_request_metrics_by_merge_request_id
ON
merge_request_metrics
USING
btree
(
merge_request_id
);
CREATE
UNIQUE
INDEX
users_security_dashboard_projects_unique_index
ON
users_security_dashboard_projects
USING
btree
(
project_id
,
user_id
);
...
...
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