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
2d4b9206
Commit
2d4b9206
authored
Nov 03, 2020
by
Mehmet Emin INAC
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add temporary index to `vulnerabilities` table
parent
f7ee145f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
0 deletions
+21
-0
db/migrate/20201102231721_add_temporary_index_to_vulnerabilities_table.rb
...102231721_add_temporary_index_to_vulnerabilities_table.rb
+18
-0
db/schema_migrations/20201102231721
db/schema_migrations/20201102231721
+1
-0
db/structure.sql
db/structure.sql
+2
-0
No files found.
db/migrate/20201102231721_add_temporary_index_to_vulnerabilities_table.rb
0 → 100644
View file @
2d4b9206
# frozen_string_literal: true
class
AddTemporaryIndexToVulnerabilitiesTable
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'temporary_index_vulnerabilities_on_id'
disable_ddl_transaction!
def
up
add_concurrent_index
:vulnerabilities
,
:id
,
where:
"state = 2 AND (dismissed_at IS NULL OR dismissed_by_id IS NULL)"
,
name:
INDEX_NAME
end
def
down
remove_concurrent_index_by_name
:vulnerabilities
,
INDEX_NAME
end
end
db/schema_migrations/20201102231721
0 → 100644
View file @
2d4b9206
2aa43de4e88dae59b117d6479f6c5d113bda1e0bce4290bf6103f1b9f7694917
\ No newline at end of file
db/structure.sql
View file @
2d4b9206
...
...
@@ -22200,6 +22200,8 @@ CREATE UNIQUE INDEX snippet_user_mentions_on_snippet_id_index ON snippet_user_me
CREATE
UNIQUE
INDEX
taggings_idx
ON
taggings
USING
btree
(
tag_id
,
taggable_id
,
taggable_type
,
context
,
tagger_id
,
tagger_type
);
CREATE
INDEX
temporary_index_vulnerabilities_on_id
ON
vulnerabilities
USING
btree
(
id
)
WHERE
((
state
=
2
)
AND
((
dismissed_at
IS
NULL
)
OR
(
dismissed_by_id
IS
NULL
)));
CREATE
UNIQUE
INDEX
term_agreements_unique_index
ON
term_agreements
USING
btree
(
user_id
,
term_id
);
CREATE
INDEX
terraform_state_versions_verification_checksum_partial
ON
terraform_state_versions
USING
btree
(
verification_checksum
)
WHERE
(
verification_checksum
IS
NOT
NULL
);
...
...
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