Commit e8213b34 authored by Sean McGivern's avatar Sean McGivern

Merge branch 'issue_25112' into 'master'

Disable invalid service templates

Closes #25112

See merge request !8850
parents 88132258 de12a69a
---
title: Disable invalid service templates
merge_request:
author:
class DisableInvalidServiceTemplates < 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
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170210075922) do
ActiveRecord::Schema.define(version: 20170211073944) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......
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