Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb')
-rw-r--r--db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb b/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb
deleted file mode 100644
index f4869b15735..00000000000
--- a/db/migrate/20200625045442_add_idx_and_fk_for_prometheus_and_environment_to_alert_management_alerts.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class AddIdxAndFkForPrometheusAndEnvironmentToAlertManagementAlerts < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- def up
- add_concurrent_index :alert_management_alerts, :prometheus_alert_id, where: 'prometheus_alert_id is not null'
- add_concurrent_foreign_key :alert_management_alerts, :prometheus_alerts, column: :prometheus_alert_id, on_delete: :cascade
-
- add_concurrent_index :alert_management_alerts, :environment_id, where: 'environment_id is not null'
- add_concurrent_foreign_key :alert_management_alerts, :environments, column: :environment_id, on_delete: :nullify
- end
-
- def down
- remove_concurrent_index :alert_management_alerts, :prometheus_alert_id
- remove_foreign_key_without_error :alert_management_alerts, column: :prometheus_alert_id
-
- remove_concurrent_index :alert_management_alerts, :environment_id
- remove_foreign_key_without_error :alert_management_alerts, column: :environment_id
- end
-end