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
6fc5b843
Commit
6fc5b843
authored
Jan 14, 2021
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unneeded index
- add changelog
parent
9a614e57
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
2 deletions
+26
-2
changelogs/unreleased/297503-cablett-remove-index.yml
changelogs/unreleased/297503-cablett-remove-index.yml
+5
-0
db/migrate/20210114033715_remove_group_id_title_index.rb
db/migrate/20210114033715_remove_group_id_title_index.rb
+20
-0
db/schema_migrations/20210114033715
db/schema_migrations/20210114033715
+1
-0
db/structure.sql
db/structure.sql
+0
-2
No files found.
changelogs/unreleased/297503-cablett-remove-index.yml
0 → 100644
View file @
6fc5b843
---
title
:
Remove unneeded group label index
merge_request
:
51676
author
:
type
:
other
db/migrate/20210114033715_remove_group_id_title_index.rb
0 → 100644
View file @
6fc5b843
# frozen_string_literal: true
class
RemoveGroupIdTitleIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
INDEX_NAME
=
'index_labels_on_group_id_and_title_with_null_project_id'
LABELS_TABLE
=
:labels
def
up
remove_concurrent_index_by_name
LABELS_TABLE
,
INDEX_NAME
end
def
down
add_concurrent_index
LABELS_TABLE
,
[
:group_id
,
:title
],
where:
'project_id IS NULL'
,
name:
INDEX_NAME
end
end
db/schema_migrations/20210114033715
0 → 100644
View file @
6fc5b843
69aae8d967fdb8af816a969fd818ed325b8d780b4faaa205c78a66c5d533ab2a
\ No newline at end of file
db/structure.sql
View file @
6fc5b843
...
...
@@ -22045,8 +22045,6 @@ CREATE UNIQUE INDEX index_labels_on_group_id_and_project_id_and_title ON labels
CREATE
UNIQUE
INDEX
index_labels_on_group_id_and_title_unique
ON
labels
USING
btree
(
group_id
,
title
)
WHERE
(
project_id
IS
NULL
);
CREATE
INDEX
index_labels_on_group_id_and_title_with_null_project_id
ON
labels
USING
btree
(
group_id
,
title
)
WHERE
(
project_id
IS
NULL
);
CREATE
INDEX
index_labels_on_project_id
ON
labels
USING
btree
(
project_id
);
CREATE
UNIQUE
INDEX
index_labels_on_project_id_and_title_unique
ON
labels
USING
btree
(
project_id
,
title
)
WHERE
(
group_id
IS
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