Remove deprecated CI service

This commit is contained in:
Z.J. van de Weg 2017-02-14 15:15:41 +01:00
parent 865e3fcc13
commit 178b6014f8
5 changed files with 21 additions and 10 deletions

View File

@ -1,8 +0,0 @@
# TODO(ayufan): The GitLabCiService is deprecated and the type should be removed when the database entries are removed
class GitlabCiService < CiService
# We override the active accessor to always make GitLabCiService disabled
# Otherwise the GitLabCiService can be picked, but should never be since it's deprecated
def active
false
end
end

View File

@ -27,7 +27,7 @@ class Service < ActiveRecord::Base
validates :project_id, presence: true, unless: Proc.new { |service| service.template? }
scope :visible, -> { where.not(type: ['GitlabIssueTrackerService', 'GitlabCiService']) }
scope :visible, -> { where.not(type: 'GitlabIssueTrackerService') }
scope :issue_trackers, -> { where(category: 'issue_tracker') }
scope :external_wikis, -> { where(type: 'ExternalWikiService').active }
scope :active, -> { where(active: true) }

View File

@ -0,0 +1,4 @@
---
title: Remove deprecated GitlabCiService
merge_request:
author:

View File

@ -0,0 +1,15 @@
class DeleteDeprecatedGitlabCiService < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
disable_statement_timeout
execute("DELETE FROM services WHERE type = 'GitlabCiService';")
end
def down
# noop
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170210075922) do
ActiveRecord::Schema.define(version: 20170214111112) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"