diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 03:09:28 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-05 03:09:28 +0300 |
commit | 84d0065f0a5ee5bad180b1925a87dcda60d8519d (patch) | |
tree | 8b4cbf431e47f1453e8c651180f844c41c6b0aaa /db | |
parent | f4726e9f5029931fc74aee9d5eff93d6a762dcff (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20210203002331_drop_backup_label_index.rb | 19 | ||||
-rw-r--r-- | db/schema_migrations/20210203002331 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/db/migrate/20210203002331_drop_backup_label_index.rb b/db/migrate/20210203002331_drop_backup_label_index.rb new file mode 100644 index 00000000000..430d2d0fb79 --- /dev/null +++ b/db/migrate/20210203002331_drop_backup_label_index.rb @@ -0,0 +1,19 @@ +# 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 diff --git a/db/schema_migrations/20210203002331 b/db/schema_migrations/20210203002331 new file mode 100644 index 00000000000..f1ed6bf23f6 --- /dev/null +++ b/db/schema_migrations/20210203002331 @@ -0,0 +1 @@ +b8a19b2ebf648a1b79a488a7a2847f6a392e594464c1ba0ae96f274f583559e3
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 017ef14931f..16abc737975 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -21025,8 +21025,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 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_title_idx ON backup_labels USING btree (title); |