diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 21:42:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-23 21:42:02 +0300 |
commit | 5a1541a44f745cf9ae4121d6919a1530a7212afe (patch) | |
tree | 3841ea24d9eaa1e5521f168348af3fd409aab962 /db/migrate | |
parent | f1bc6c9f752e5dcf11f5798c70498e9ae4a8e3ec (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-ee
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb | 18 | ||||
-rw-r--r-- | db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb | 15 |
2 files changed, 22 insertions, 11 deletions
diff --git a/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb b/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb new file mode 100644 index 00000000000..52d24de60d5 --- /dev/null +++ b/db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddServiceDeskReplyToIsNotNullIndexOnIssuesFix < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'idx_on_issues_where_service_desk_reply_to_is_not_null' + + disable_ddl_transaction! + + def up + add_concurrent_index(:issues, [:id], name: INDEX_NAME, where: 'service_desk_reply_to IS NOT NULL') + end + + def down + remove_concurrent_index_by_name(:issues, INDEX_NAME) + end +end diff --git a/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb b/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb index fb5429af458..7643fc107aa 100644 --- a/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb +++ b/db/migrate/20201221225303_add_service_desk_reply_to_is_not_null_index_on_issues.rb @@ -1,18 +1,11 @@ # frozen_string_literal: true class AddServiceDeskReplyToIsNotNullIndexOnIssues < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - DOWNTIME = false - INDEX_NAME = 'idx_on_issues_where_service_desk_reply_to_is_not_null' - - disable_ddl_transaction! - - def up - add_concurrent_index(:issues, [:id], name: INDEX_NAME, where: 'service_desk_reply_to IS NOT NULL') - end - def down - remove_concurrent_index_by_name(:issues, INDEX_NAME) + def change + # no-op, the migration's version number was lowered to be executed earlier than db/post_migrate/20201128210234_schedule_populate_issue_email_participants.rb + # + # The new migration is located here: db/migrate/20201128210000_add_service_desk_reply_to_is_not_null_index_on_issues_fix.rb end end |