summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2018-07-09 11:17:46 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2018-07-09 11:17:46 +0000
commit8dfa7a429ebea1b384d861bd3a52cbc3ff999ec3 (patch)
tree419b9f09a52e820d67c7559f7fbab116290f7ff8
parentd4301731ecce5b08206e328224dca4d27b6e9ba2 (diff)
parent8199b2d3ceb76f90759831fee5dbdd67e0bc5d29 (diff)
downloadgitlab-ce-8dfa7a429ebea1b384d861bd3a52cbc3ff999ec3.tar.gz
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
-rw-r--r--changelogs/unreleased/48976-rails5-invalid-single-table-inheritance-type-group-is-not-a-subclass-of-gitlab-backgroundmigration-fixcrossprojectlabellinks-namespace.yml6
-rw-r--r--lib/gitlab/background_migration/fix_cross_project_label_links.rb2
2 files changed, 8 insertions, 0 deletions
diff --git a/changelogs/unreleased/48976-rails5-invalid-single-table-inheritance-type-group-is-not-a-subclass-of-gitlab-backgroundmigration-fixcrossprojectlabellinks-namespace.yml b/changelogs/unreleased/48976-rails5-invalid-single-table-inheritance-type-group-is-not-a-subclass-of-gitlab-backgroundmigration-fixcrossprojectlabellinks-namespace.yml
new file mode 100644
index 00000000000..e95536b213c
--- /dev/null
+++ b/changelogs/unreleased/48976-rails5-invalid-single-table-inheritance-type-group-is-not-a-subclass-of-gitlab-backgroundmigration-fixcrossprojectlabellinks-namespace.yml
@@ -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
diff --git a/lib/gitlab/background_migration/fix_cross_project_label_links.rb b/lib/gitlab/background_migration/fix_cross_project_label_links.rb
index fa68ba5cca7..0a12401c35f 100644
--- a/lib/gitlab/background_migration/fix_cross_project_label_links.rb
+++ b/lib/gitlab/background_migration/fix_cross_project_label_links.rb
@@ -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)