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
d016696d
Commit
d016696d
authored
Nov 27, 2020
by
Adrien Kohlbecker
Committed by
Patrick Bair
Nov 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "squash!"
This reverts commit 102f1c8e97fdcd8dbca61b754219e83d33398482.
parent
0f690167
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletion
+28
-1
changelogs/unreleased/ak-add-index-on-builds.yml
changelogs/unreleased/ak-add-index-on-builds.yml
+5
-0
db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb
...120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb
+21
-0
db/schema_migrations/20201120140210
db/schema_migrations/20201120140210
+1
-0
db/structure.sql
db/structure.sql
+1
-1
No files found.
changelogs/unreleased/ak-add-index-on-builds.yml
0 → 100644
View file @
d016696d
---
title
:
Adds id desc to index_ci_builds_on_runner_id_and_id_desc
merge_request
:
48241
author
:
type
:
fixed
db/post_migrate/20201120140210_add_runner_id_and_id_desc_index_to_ci_builds.rb
0 → 100644
View file @
d016696d
# frozen_string_literal: true
class
AddRunnerIdAndIdDescIndexToCiBuilds
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
NEW_INDEX
=
'index_ci_builds_on_runner_id_and_id_desc'
OLD_INDEX
=
'index_ci_builds_on_runner_id'
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_builds
,
%i[runner_id id]
,
name:
NEW_INDEX
,
order:
{
id: :desc
}
remove_concurrent_index_by_name
:ci_builds
,
OLD_INDEX
end
def
down
add_concurrent_index
:ci_builds
,
%i[runner_id]
,
name:
OLD_INDEX
remove_concurrent_index_by_name
:ci_builds
,
NEW_INDEX
end
end
db/schema_migrations/20201120140210
0 → 100644
View file @
d016696d
6b88d79aa8d373fa1d9aa2698a9d20c09aff14ef16af4c123abd4e7c98e41311
\ No newline at end of file
db/structure.sql
View file @
d016696d
...
...
@@ -20479,7 +20479,7 @@ CREATE INDEX index_ci_builds_on_protected ON ci_builds USING btree (protected);
CREATE
INDEX
index_ci_builds_on_queued_at
ON
ci_builds
USING
btree
(
queued_at
);
CREATE
INDEX
index_ci_builds_on_runner_id
ON
ci_builds
USING
btree
(
runner_id
);
CREATE
INDEX
index_ci_builds_on_runner_id
_and_id_desc
ON
ci_builds
USING
btree
(
runner_id
,
id
DESC
);
CREATE
INDEX
index_ci_builds_on_stage_id
ON
ci_builds
USING
btree
(
stage_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