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
f84fe0c2
Commit
f84fe0c2
authored
Mar 10, 2020
by
Felipe Artur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove promoted notes temporary index
parent
469e2348
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
changelogs/unreleased/issue_205690.yml
changelogs/unreleased/issue_205690.yml
+5
-0
db/post_migrate/20200310135818_remove_temporary_promoted_notes_index.rb
...e/20200310135818_remove_temporary_promoted_notes_index.rb
+22
-0
db/schema.rb
db/schema.rb
+0
-1
No files found.
changelogs/unreleased/issue_205690.yml
0 → 100644
View file @
f84fe0c2
---
title
:
Remove promoted notes temporary index
merge_request
:
26896
author
:
type
:
other
db/post_migrate/20200310135818_remove_temporary_promoted_notes_index.rb
0 → 100644
View file @
f84fe0c2
# frozen_string_literal: true
# Removes temporary index to fix orphan promoted issues.
# For more information check: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/23916
class
RemoveTemporaryPromotedNotesIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
remove_concurrent_index_by_name
:notes
,
'tmp_idx_on_promoted_notes'
end
def
down
add_concurrent_index
:notes
,
:note
,
where:
"noteable_type = 'Issue' AND system IS TRUE AND note LIKE 'promoted to epic%'"
,
name:
'tmp_idx_on_promoted_notes'
end
end
db/schema.rb
View file @
f84fe0c2
...
...
@@ -2844,7 +2844,6 @@ ActiveRecord::Schema.define(version: 2020_03_11_165635) do
t
.
index
[
"id"
,
"noteable_type"
],
name:
"note_mentions_temp_index"
,
where:
"(note ~~ '%@%'::text)"
t
.
index
[
"line_code"
],
name:
"index_notes_on_line_code"
t
.
index
[
"note"
],
name:
"index_notes_on_note_trigram"
,
opclass: :gin_trgm_ops
,
using: :gin
t
.
index
[
"note"
],
name:
"tmp_idx_on_promoted_notes"
,
where:
"(((noteable_type)::text = 'Issue'::text) AND (system IS TRUE) AND (note ~~ 'promoted to epic%'::text))"
t
.
index
[
"noteable_id"
,
"noteable_type"
],
name:
"index_notes_on_noteable_id_and_noteable_type"
t
.
index
[
"project_id"
,
"id"
],
name:
"index_notes_on_project_id_and_id_and_system_false"
,
where:
"(NOT system)"
t
.
index
[
"project_id"
,
"noteable_type"
],
name:
"index_notes_on_project_id_and_noteable_type"
...
...
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