diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 00:09:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 00:09:06 +0300 |
commit | 3e308768fd9306a49bb0149ca3636e8e8285485d (patch) | |
tree | 814b19f607218d670b0cfeccd5963d6320aec3d5 /db | |
parent | c0ef148ef349f0d13331638ab90f5d9e9d2175ba (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
3 files changed, 23 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 diff --git a/db/schema_migrations/20201128210000 b/db/schema_migrations/20201128210000 new file mode 100644 index 00000000000..9ce8d37ff37 --- /dev/null +++ b/db/schema_migrations/20201128210000 @@ -0,0 +1 @@ +2f7415e3e3e66f326f2f65c38406c2103d5075493c86a836497c3541655f4e86
\ No newline at end of file |