Commit 68b20b28 authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'fix-email-participants-migration-version-number' into 'master'

Fix issue email participants migration version

See merge request gitlab-org/gitlab!54346
parents b45daa98 8213e275
---
title: Fix creating the idx_on_issues_where_service_desk_reply_to_is_not_null index
before the post migration
merge_request: 54346
author:
type: other
# 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
# 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
2f7415e3e3e66f326f2f65c38406c2103d5075493c86a836497c3541655f4e86
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment