ref: master
plugins/environment_notification/db/migrate/20160321190725_reactivate_plugin_after_rename.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
class ReactivatePluginAfterRename < ActiveRecord::Migration def up script_path = Rails.root.join('script').to_s system(script_path + '/noosfero-plugins disable environment_notification') system(script_path + '/noosfero-plugins enable admin_notifications') system("rake db:migrate") end def down raise ActiveRecord::IrreversibleMigration end end |