Merge branch '48976-rails5-invalid-single-table-inheritance-type-group-is-not-a-subclass-of-gitlab-backgroundmigration-fixcrossprojectlabellinks-namespace' into 'master'

Resolve "[Rails5] Invalid single-table inheritance type: Group is not a subclass of Gitlab::BackgroundMigration::FixCrossProjectLabelLinks::Namespace"

Closes #48976

See merge request gitlab-org/gitlab-ce!20462
This commit is contained in:
Yorick Peterse 2018-07-09 11:17:46 +00:00
commit 8dfa7a429e
2 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,6 @@
---
title: "[Rails5] Fix 'Invalid single-table inheritance type: Group is not a subclass
of Gitlab::BackgroundMigration::FixCrossProjectLabelLinks::Namespace'"
merge_request: 20462
author: "@blackst0ne"
type: fixed

View File

@ -11,6 +11,7 @@ module Gitlab
end
class Label < ActiveRecord::Base
self.inheritance_column = :_type_disabled
self.table_name = 'labels'
end
@ -27,6 +28,7 @@ module Gitlab
end
class Namespace < ActiveRecord::Base
self.inheritance_column = :_type_disabled
self.table_name = 'namespaces'
def self.groups_with_descendants_ids(start_id, stop_id)