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/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb')
-rw-r--r--db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb b/db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb
deleted file mode 100644
index ff60e3bdac1..00000000000
--- a/db/migrate/20200519074709_update_resource_state_events_constraint_to_support_epic_id.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-# frozen_string_literal: true
-
-class UpdateResourceStateEventsConstraintToSupportEpicId < ActiveRecord::Migration[6.0]
- include Gitlab::Database::MigrationHelpers
-
- DOWNTIME = false
-
- disable_ddl_transaction!
-
- OLD_CONSTRAINT = 'resource_state_events_must_belong_to_issue_or_merge_request'
- CONSTRAINT_NAME = 'resource_state_events_must_belong_to_issue_or_merge_request_or_'
-
- def up
- remove_check_constraint :resource_state_events, OLD_CONSTRAINT
- add_check_constraint :resource_state_events, "(issue_id != NULL AND merge_request_id IS NULL AND epic_id IS NULL) OR " \
- "(issue_id IS NULL AND merge_request_id != NULL AND epic_id IS NULL) OR" \
- "(issue_id IS NULL AND merge_request_id IS NULL AND epic_id != NULL)", CONSTRAINT_NAME
- end
-
- def down
- remove_check_constraint :resource_state_events, CONSTRAINT_NAME
- add_check_constraint :resource_state_events, '(issue_id != NULL AND merge_request_id IS NULL) OR (merge_request_id != NULL AND issue_id IS NULL)', OLD_CONSTRAINT
- end
-end