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
576b397d
Commit
576b397d
authored
Jul 29, 2019
by
Andreas Brandl
Committed by
Mayra Cabrera
Jul 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create index on environments by state
parent
0a0b442f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
changelogs/unreleased/ab-add-index-on-environments.yml
changelogs/unreleased/ab-add-index-on-environments.yml
+5
-0
db/migrate/20190729090456_add_index_on_environments_with_state.rb
...te/20190729090456_add_index_on_environments_with_state.rb
+17
-0
db/schema.rb
db/schema.rb
+2
-1
No files found.
changelogs/unreleased/ab-add-index-on-environments.yml
0 → 100644
View file @
576b397d
---
title
:
Create index on environments by state
merge_request
:
31231
author
:
type
:
performance
db/migrate/20190729090456_add_index_on_environments_with_state.rb
0 → 100644
View file @
576b397d
# frozen_string_literal: true
class
AddIndexOnEnvironmentsWithState
<
ActiveRecord
::
Migration
[
5.2
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:environments
,
[
:project_id
,
:state
]
end
def
down
remove_concurrent_index
:environments
,
[
:project_id
,
:state
]
end
end
db/schema.rb
View file @
576b397d
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2019_07_2
5_012225
)
do
ActiveRecord
::
Schema
.
define
(
version:
2019_07_2
9_090456
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"pg_trgm"
...
...
@@ -1174,6 +1174,7 @@ ActiveRecord::Schema.define(version: 2019_07_25_012225) do
t
.
index
[
"name"
],
name:
"index_environments_on_name_varchar_pattern_ops"
,
opclass: :varchar_pattern_ops
t
.
index
[
"project_id"
,
"name"
],
name:
"index_environments_on_project_id_and_name"
,
unique:
true
t
.
index
[
"project_id"
,
"slug"
],
name:
"index_environments_on_project_id_and_slug"
,
unique:
true
t
.
index
[
"project_id"
,
"state"
],
name:
"index_environments_on_project_id_and_state"
end
create_table
"epic_issues"
,
id: :serial
,
force: :cascade
do
|
t
|
...
...
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