diff options
Diffstat (limited to 'db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb')
-rw-r--r-- | db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb b/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb deleted file mode 100644 index 248195c8c75..00000000000 --- a/db/migrate/20200702201039_change_prometheus_metrics_identifier_index.rb +++ /dev/null @@ -1,22 +0,0 @@ -# frozen_string_literal: true - -class ChangePrometheusMetricsIdentifierIndex < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - - NEW_INDEX = :index_prometheus_metrics_on_identifier_and_null_project - OLD_INDEX = :index_prometheus_metrics_on_identifier - - disable_ddl_transaction! - - def up - add_concurrent_index :prometheus_metrics, :identifier, name: NEW_INDEX, unique: true, where: 'project_id IS NULL' - remove_concurrent_index_by_name :prometheus_metrics, OLD_INDEX - end - - def down - add_concurrent_index :prometheus_metrics, :identifier, name: OLD_INDEX, unique: true - remove_concurrent_index_by_name :prometheus_metrics, NEW_INDEX - end -end |