diff options
Diffstat (limited to 'db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb')
-rw-r--r-- | db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb b/db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb deleted file mode 100644 index c9e0193f5d2..00000000000 --- a/db/post_migrate/20200511162115_add_missing_index_to_service_unique_instance_per_type.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -class AddMissingIndexToServiceUniqueInstancePerType < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - disable_ddl_transaction! - - # This is a corrective migration to keep the index on instance column. - # Upgrade from 12.7 to 12.9 removes the instance column as it was first added - # in the normal migration and then removed in the post migration. - # - # 12.8 removed the instance column in a post deployment migration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/24885 - # 12.9 added the instance column in a normal migration https://gitlab.com/gitlab-org/gitlab/-/merge_requests/25714 - def up - unless index_exists_by_name?(:services, 'index_services_on_type_and_instance') - add_concurrent_index(:services, [:type, :instance], unique: true, where: 'instance IS TRUE') - end - end - - def down - # Does not apply - end -end |