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
e0ea0eea
Commit
e0ea0eea
authored
Feb 03, 2021
by
charlie ablett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove inconsistent index
- and restore it exactly upon down
parent
01a8bb6f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
2 deletions
+25
-2
changelogs/unreleased/296756-cablett-remove-index.yml
changelogs/unreleased/296756-cablett-remove-index.yml
+5
-0
db/migrate/20210203002331_drop_backup_label_index.rb
db/migrate/20210203002331_drop_backup_label_index.rb
+19
-0
db/schema_migrations/20210203002331
db/schema_migrations/20210203002331
+1
-0
db/structure.sql
db/structure.sql
+0
-2
No files found.
changelogs/unreleased/296756-cablett-remove-index.yml
0 → 100644
View file @
e0ea0eea
---
title
:
Remove inconsistent index in backup_labels table
merge_request
:
53189
author
:
type
:
other
db/migrate/20210203002331_drop_backup_label_index.rb
0 → 100644
View file @
e0ea0eea
# frozen_string_literal: true
class
DropBackupLabelIndex
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
INDEX_NAME
=
'backup_labels_project_id_title_idx'
def
up
remove_concurrent_index_by_name
(
:backup_labels
,
name:
INDEX_NAME
)
end
def
down
add_concurrent_index
:backup_labels
,
[
:project_id
,
:title
],
name:
INDEX_NAME
,
unique:
true
,
where:
'group_id = NULL::integer'
end
end
db/schema_migrations/20210203002331
0 → 100644
View file @
e0ea0eea
b8a19b2ebf648a1b79a488a7a2847f6a392e594464c1ba0ae96f274f583559e3
\ No newline at end of file
db/structure.sql
View file @
e0ea0eea
...
@@ -21023,8 +21023,6 @@ CREATE INDEX backup_labels_group_id_title_idx ON backup_labels USING btree (grou
...
@@ -21023,8 +21023,6 @@ CREATE INDEX backup_labels_group_id_title_idx ON backup_labels USING btree (grou
CREATE
INDEX
backup_labels_project_id_idx
ON
backup_labels
USING
btree
(
project_id
);
CREATE
INDEX
backup_labels_project_id_idx
ON
backup_labels
USING
btree
(
project_id
);
CREATE
UNIQUE
INDEX
backup_labels_project_id_title_idx
ON
backup_labels
USING
btree
(
project_id
,
title
)
WHERE
(
group_id
=
NULL
::
integer
);
CREATE
INDEX
backup_labels_template_idx
ON
backup_labels
USING
btree
(
template
)
WHERE
template
;
CREATE
INDEX
backup_labels_template_idx
ON
backup_labels
USING
btree
(
template
)
WHERE
template
;
CREATE
INDEX
backup_labels_title_idx
ON
backup_labels
USING
btree
(
title
);
CREATE
INDEX
backup_labels_title_idx
ON
backup_labels
USING
btree
(
title
);
...
...
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