scinote-web/db/migrate/20160704110900_remove_keywords_from_module_protocols.rb

10 lines
205 B
Ruby
Raw Normal View History

2017-06-30 16:23:28 +08:00
class RemoveKeywordsFromModuleProtocols < ActiveRecord::Migration[4.2]
2016-07-21 19:11:15 +08:00
def up
Protocol.find_each do |p|
if p.in_module? then
p.protocol_keywords.destroy_all
end
end
end
2017-06-30 16:23:28 +08:00
end