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:
commit
8dfa7a429e
|
@ -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
|
|
@ -11,6 +11,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
class Label < ActiveRecord::Base
|
class Label < ActiveRecord::Base
|
||||||
|
self.inheritance_column = :_type_disabled
|
||||||
self.table_name = 'labels'
|
self.table_name = 'labels'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -27,6 +28,7 @@ module Gitlab
|
||||||
end
|
end
|
||||||
|
|
||||||
class Namespace < ActiveRecord::Base
|
class Namespace < ActiveRecord::Base
|
||||||
|
self.inheritance_column = :_type_disabled
|
||||||
self.table_name = 'namespaces'
|
self.table_name = 'namespaces'
|
||||||
|
|
||||||
def self.groups_with_descendants_ids(start_id, stop_id)
|
def self.groups_with_descendants_ids(start_id, stop_id)
|
||||||
|
|
Loading…
Reference in New Issue