2017-01-27 14:22:17 -05:00
|
|
|
class DisableInvalidServiceTemplates < ActiveRecord::Migration
|
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-03-01 05:26:44 -05:00
|
|
|
class Service < ActiveRecord::Base
|
|
|
|
self.inheritance_column = nil
|
2017-01-27 14:22:17 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
def up
|
|
|
|
Service.where(template: true, active: true).each do |template|
|
|
|
|
template.update(active: false) unless template.valid?
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|