diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 18:10:47 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 18:10:47 +0300 |
commit | 5ff5047fdc2c614f347de5c388424b50a5460165 (patch) | |
tree | 4c6ca5c4cb1e822e4ac213b44b1334000c00fa7d /db | |
parent | 6cbe9eaeb3b69ff378e23eec3a5f33caf92b6d16 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/fixtures/development/30_composer_packages.rb | 8 | ||||
-rw-r--r-- | db/migrate/20210216223335_remove_index_on_issues_where_service_desk_reply_to_is_not_null.rb | 21 | ||||
-rw-r--r-- | db/schema_migrations/20210216223335 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
4 files changed, 27 insertions, 5 deletions
diff --git a/db/fixtures/development/30_composer_packages.rb b/db/fixtures/development/30_composer_packages.rb index fa8c648de9e..a30d838ad8c 100644 --- a/db/fixtures/development/30_composer_packages.rb +++ b/db/fixtures/development/30_composer_packages.rb @@ -110,9 +110,11 @@ Gitlab::Seeder.quiet do next end - ::Packages::Composer::CreatePackageService - .new(project, project.owner, params) - .execute + Sidekiq::Worker.skipping_transaction_check do + ::Packages::Composer::CreatePackageService + .new(project, project.owner, params) + .execute + end puts "version #{version.inspect} created!" end diff --git a/db/migrate/20210216223335_remove_index_on_issues_where_service_desk_reply_to_is_not_null.rb b/db/migrate/20210216223335_remove_index_on_issues_where_service_desk_reply_to_is_not_null.rb new file mode 100644 index 00000000000..5224b6f7031 --- /dev/null +++ b/db/migrate/20210216223335_remove_index_on_issues_where_service_desk_reply_to_is_not_null.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class RemoveIndexOnIssuesWhereServiceDeskReplyToIsNotNull < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + INDEX_TABLE = :issues + INDEX_NAME = 'idx_on_issues_where_service_desk_reply_to_is_not_null' + + def up + Gitlab::BackgroundMigration.steal('PopulateIssueEmailParticipants') + remove_concurrent_index_by_name INDEX_TABLE, INDEX_NAME + end + + def down + add_concurrent_index(INDEX_TABLE, [:id], name: INDEX_NAME, where: 'service_desk_reply_to IS NOT NULL') + end +end diff --git a/db/schema_migrations/20210216223335 b/db/schema_migrations/20210216223335 new file mode 100644 index 00000000000..a086aaa8c91 --- /dev/null +++ b/db/schema_migrations/20210216223335 @@ -0,0 +1 @@ +52bf190bdb219366c790a5b7c081bfb383543498780cc95a25eafcecea036426
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 0ce27a5ca70..811f80ea9e9 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -21355,8 +21355,6 @@ CREATE INDEX idx_mr_cc_diff_files_on_mr_cc_id_and_sha ON merge_request_context_c CREATE UNIQUE INDEX idx_on_compliance_management_frameworks_namespace_id_name ON compliance_management_frameworks USING btree (namespace_id, name); -CREATE INDEX idx_on_issues_where_service_desk_reply_to_is_not_null ON issues USING btree (id) WHERE (service_desk_reply_to IS NOT NULL); - CREATE INDEX idx_packages_build_infos_on_package_id ON packages_build_infos USING btree (package_id); CREATE INDEX idx_packages_debian_group_component_files_on_architecture_id ON packages_debian_group_component_files USING btree (architecture_id); |