20160224120316_add_mode_option_to_ftpsite_agents.rb 352 B

123456789101112131415
  1. class AddModeOptionToFtpsiteAgents < ActiveRecord::Migration[4.2]
  2. def up
  3. Agents::FtpsiteAgent.find_each do |agent|
  4. agent.options['mode'] = 'read'
  5. agent.save!(validate: false)
  6. end
  7. end
  8. def down
  9. Agents::FtpsiteAgent.find_each do |agent|
  10. agent.options.delete 'mode'
  11. agent.save!(validate: false)
  12. end
  13. end
  14. end