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/post_migrate/20191021101942_remove_empty_github_service_templates.rb')
-rw-r--r--db/post_migrate/20191021101942_remove_empty_github_service_templates.rb28
1 files changed, 0 insertions, 28 deletions
diff --git a/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb b/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb
deleted file mode 100644
index 64abe93b3e8..00000000000
--- a/db/post_migrate/20191021101942_remove_empty_github_service_templates.rb
+++ /dev/null
@@ -1,28 +0,0 @@
-# frozen_string_literal: true
-
-## It's expected to delete one record on GitLab.com
-#
-class RemoveEmptyGithubServiceTemplates < ActiveRecord::Migration[5.2]
- DOWNTIME = false
-
- class Service < ActiveRecord::Base
- self.table_name = 'services'
- self.inheritance_column = :_type_disabled
-
- serialize :properties, JSON
- end
-
- def up
- relationship.where(properties: {}).delete_all
- end
-
- def down
- relationship.find_or_create_by!(properties: {})
- end
-
- private
-
- def relationship
- RemoveEmptyGithubServiceTemplates::Service.where(template: true, type: 'GithubService')
- end
-end