Skip to content
Snippets Groups Projects
Commit 8e96336f authored by Sean McGivern's avatar Sean McGivern Committed by James Lopez
Browse files

Merge branch '30024-owner-can-t-initialize-git-repo-for-new-project-in-group' into 'master'

Disable invalid service templates (again)

Closes #30024

See merge request !10339
parent 894817fc
No related branches found
No related tags found
No related merge requests found
Pipeline #
---
title: Disable invalid service templates
merge_request:
author:
# This is the same as DisableInvalidServiceTemplates. Later migrations may have
# inadventently enabled some invalid templates again.
#
class DisableInvalidServiceTemplates2 < ActiveRecord::Migration
DOWNTIME = false
unless defined?(Service)
class Service < ActiveRecord::Base
self.inheritance_column = nil
end
end
def up
Service.where(template: true, active: true).each do |template|
template.update(active: false) unless template.valid?
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment