summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-07-05 12:08:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-07-05 12:08:33 +0000
commite8fc7f565017d915278fd0efbcff2f81b7e94093 (patch)
tree4b9fc9318e0179f04934a27c57a9e1bb570df856 /db
parentcf98b5d69a84324cad0f23b786a0ec0937c90944 (diff)
downloadgitlab-ce-e8fc7f565017d915278fd0efbcff2f81b7e94093.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210629153519_add_index_to_bulk_import_entities_on_bulk_import_id_and_status.rb20
-rw-r--r--db/schema_migrations/202106291535191
-rw-r--r--db/structure.sql2
3 files changed, 22 insertions, 1 deletions
diff --git a/db/migrate/20210629153519_add_index_to_bulk_import_entities_on_bulk_import_id_and_status.rb b/db/migrate/20210629153519_add_index_to_bulk_import_entities_on_bulk_import_id_and_status.rb
new file mode 100644
index 00000000000..c84a42cbea4
--- /dev/null
+++ b/db/migrate/20210629153519_add_index_to_bulk_import_entities_on_bulk_import_id_and_status.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class AddIndexToBulkImportEntitiesOnBulkImportIdAndStatus < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ NEW_INDEX_NAME = 'index_bulk_import_entities_on_bulk_import_id_and_status'
+ OLD_INDEX_NAME = 'index_bulk_import_entities_on_bulk_import_id'
+
+ def up
+ add_concurrent_index :bulk_import_entities, [:bulk_import_id, :status], name: NEW_INDEX_NAME
+ remove_concurrent_index_by_name :bulk_import_entities, name: OLD_INDEX_NAME
+ end
+
+ def down
+ add_concurrent_index :bulk_import_entities, :bulk_import_id, name: OLD_INDEX_NAME
+ remove_concurrent_index_by_name :bulk_import_entities, name: NEW_INDEX_NAME
+ end
+end
diff --git a/db/schema_migrations/20210629153519 b/db/schema_migrations/20210629153519
new file mode 100644
index 00000000000..304ff5c9fa6
--- /dev/null
+++ b/db/schema_migrations/20210629153519
@@ -0,0 +1 @@
+cba36a2e8bedd70f8ccaca47517314d0a3c75a9b8d90715a29919247aa686835 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 12f62635bdf..b31d3e0ee25 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -22822,7 +22822,7 @@ CREATE INDEX index_broadcast_message_on_ends_at_and_broadcast_type_and_id ON bro
CREATE INDEX index_bulk_import_configurations_on_bulk_import_id ON bulk_import_configurations USING btree (bulk_import_id);
-CREATE INDEX index_bulk_import_entities_on_bulk_import_id ON bulk_import_entities USING btree (bulk_import_id);
+CREATE INDEX index_bulk_import_entities_on_bulk_import_id_and_status ON bulk_import_entities USING btree (bulk_import_id, status);
CREATE INDEX index_bulk_import_entities_on_namespace_id ON bulk_import_entities USING btree (namespace_id);