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
bda826eb
Commit
bda826eb
authored
Jul 08, 2021
by
Pavel Shutsin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix security scan query timeout
Changelog: other
parent
8ea9b0e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
0 deletions
+20
-0
db/migrate/20210708124229_add_security_scans_created_at_index.rb
...ate/20210708124229_add_security_scans_created_at_index.rb
+17
-0
db/schema_migrations/20210708124229
db/schema_migrations/20210708124229
+1
-0
db/structure.sql
db/structure.sql
+2
-0
No files found.
db/migrate/20210708124229_add_security_scans_created_at_index.rb
0 → 100644
View file @
bda826eb
# frozen_string_literal: true
class
AddSecurityScansCreatedAtIndex
<
ActiveRecord
::
Migration
[
6.1
]
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
INDEX_NAME
=
'index_security_scans_on_created_at'
def
up
add_concurrent_index
(
:security_scans
,
:created_at
,
name:
INDEX_NAME
)
end
def
down
remove_concurrent_index_by_name
(
:security_scans
,
INDEX_NAME
)
end
end
db/schema_migrations/20210708124229
0 → 100644
View file @
bda826eb
18f7a9a0e9f0b331028951adf2bf6ca9a9fc4a62872f5307ee9d74761ae06deb
\ No newline at end of file
db/structure.sql
View file @
bda826eb
...
...
@@ -24798,6 +24798,8 @@ CREATE INDEX index_security_findings_on_severity ON security_findings USING btre
CREATE UNIQUE INDEX index_security_findings_on_uuid_and_scan_id ON security_findings USING btree (uuid, scan_id);
CREATE INDEX index_security_scans_on_created_at ON security_scans USING btree (created_at);
CREATE INDEX index_security_scans_on_date_created_at_and_id ON security_scans USING btree (date(timezone('UTC'::text, created_at)), id);
CREATE INDEX index_self_managed_prometheus_alert_events_on_environment_id ON self_managed_prometheus_alert_events USING btree (environment_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