Commit b1ea0cc4 authored by Yorick Peterse's avatar Yorick Peterse Committed by GitLab Release Tools Bot

Merge branch 'sh-fix-issue-58714' into 'master'

Fix migration failure when groups are missing route

Closes #58714

See merge request gitlab-org/gitlab-ce!29022

(cherry picked from commit 0488c26e)

a52cbf6b Fix migration failure when groups are missing route
parent 6953b13c
---
title: Fix migration failure when groups are missing route
merge_request: 29022
author:
type: fixed
...@@ -98,6 +98,7 @@ class GenerateMissingRoutes < ActiveRecord::Migration[4.2] ...@@ -98,6 +98,7 @@ class GenerateMissingRoutes < ActiveRecord::Migration[4.2]
class Namespace < ActiveRecord::Base class Namespace < ActiveRecord::Base
self.table_name = 'namespaces' self.table_name = 'namespaces'
self.inheritance_column = :_type_disabled
include EachBatch include EachBatch
include GenerateMissingRoutes::Routable include GenerateMissingRoutes::Routable
......
...@@ -8,7 +8,7 @@ describe GenerateMissingRoutes, :migration do ...@@ -8,7 +8,7 @@ describe GenerateMissingRoutes, :migration do
let(:routes) { table(:routes) } let(:routes) { table(:routes) }
it 'creates routes for projects without a route' do it 'creates routes for projects without a route' do
namespace = namespaces.create!(name: 'GitLab', path: 'gitlab') namespace = namespaces.create!(name: 'GitLab', path: 'gitlab', type: 'Group')
routes.create!( routes.create!(
path: 'gitlab', path: 'gitlab',
......
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