Skip to content
Snippets Groups Projects
Commit de12a69a authored by Felipe Artur's avatar Felipe Artur
Browse files

Disable invalid service templates

parent 99df355e
No related branches found
No related tags found
No related merge requests found
---
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
Loading
Loading
@@ -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"
Loading
Loading
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