Last active
September 21, 2015 09:09
-
-
Save mPanasiewicz/79275cf20d18f28a314b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddRequestFieldToCasheNames < ActiveRecord::Migration | |
class CacheName < ActiveRecord::Base | |
end | |
def change | |
add_column :cache_names, :request, :text | |
CacheName.find_each do |cache_name| | |
cache_name.request = '{"method":"get_config","type":"kom","channel":"direct","sign":"587d6320f50666918c40c4bf125164b8","transform_ver":"' + cache_name.transform_ver + '","pkb_content_ver":"A1"}' | |
cache_name.save | |
end | |
change_column_null :cache_names, :request, false | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment