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
22b06b23
Commit
22b06b23
authored
Jan 02, 2021
by
Andreas Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop temporary index on ci builds
Relates to
https://gitlab.com/gitlab-org/gitlab/-/issues/295477
parent
71c1db7a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
changelogs/unreleased/ab-drop-tmp-index.yml
changelogs/unreleased/ab-drop-tmp-index.yml
+5
-0
db/migrate/20210102164121_drop_temporary_index_on_ci_builds.rb
...grate/20210102164121_drop_temporary_index_on_ci_builds.rb
+19
-0
db/schema_migrations/20210102164121
db/schema_migrations/20210102164121
+1
-0
db/structure.sql
db/structure.sql
+0
-2
No files found.
changelogs/unreleased/ab-drop-tmp-index.yml
0 → 100644
View file @
22b06b23
---
title
:
Drop temporary index on ci_builds
merge_request
:
50961
author
:
type
:
other
db/migrate/20210102164121_drop_temporary_index_on_ci_builds.rb
0 → 100644
View file @
22b06b23
# frozen_string_literal: true
class
DropTemporaryIndexOnCiBuilds
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
INDEX
=
'tmp_build_stage_position_index'
.
freeze
def
up
remove_concurrent_index_by_name
:ci_builds
,
INDEX
end
def
down
add_concurrent_index
:ci_builds
,
[
:stage_id
,
:stage_idx
],
where:
'stage_idx IS NOT NULL'
,
name:
INDEX
end
end
db/schema_migrations/20210102164121
0 → 100644
View file @
22b06b23
d15dc3e57f050f037dd6b6b2b1efdafee49bf411580e35a7b4dbe14868c41e13
\ No newline at end of file
db/structure.sql
View file @
22b06b23
...
...
@@ -23105,8 +23105,6 @@ CREATE INDEX temporary_index_vulnerabilities_on_id ON vulnerabilities USING btre
CREATE
UNIQUE
INDEX
term_agreements_unique_index
ON
term_agreements
USING
btree
(
user_id
,
term_id
);
CREATE
INDEX
tmp_build_stage_position_index
ON
ci_builds
USING
btree
(
stage_id
,
stage_idx
)
WHERE
(
stage_idx
IS
NOT
NULL
);
CREATE
INDEX
tmp_index_for_email_unconfirmation_migration
ON
emails
USING
btree
(
id
)
WHERE
(
confirmed_at
IS
NOT
NULL
);
CREATE
INDEX
tmp_index_on_vulnerabilities_non_dismissed
ON
vulnerabilities
USING
btree
(
id
)
WHERE
(
state
<>
2
);
...
...
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