canvas-lms/db/migrate/20150519205726_drop_unencry...

12 lines
251 B
Ruby

class DropUnencryptedTwitterSettings < ActiveRecord::Migration
tag :postdeploy
def up
PluginSetting.where(name: 'twitter').each do |ps|
ps.settings.delete(:api_key)
ps.settings.delete(:secret_key)
ps.save!
end
end
end