Commit 75946b40 authored by blackst0ne's avatar blackst0ne

[Rails5] Disable inheritance_column for...

[Rails5] Disable inheritance_column for Gitlab::Database::RenameReservedPathsMigration::V1::MigrationClasses::Namespace
parent 958c0475
---
title: "[Rails5] Invalid single-table inheritance type: Group is not a subclass of
Namespace"
merge_request: 19918
author: "@blackst0ne"
type: fixed
...@@ -37,6 +37,7 @@ module Gitlab ...@@ -37,6 +37,7 @@ module Gitlab
class Namespace < ActiveRecord::Base class Namespace < ActiveRecord::Base
include MigrationClasses::Routable include MigrationClasses::Routable
self.table_name = 'namespaces' self.table_name = 'namespaces'
self.inheritance_column = :_type_disabled
belongs_to :parent, belongs_to :parent,
class_name: "#{MigrationClasses.name}::Namespace" class_name: "#{MigrationClasses.name}::Namespace"
has_one :route, as: :source has_one :route, as: :source
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment