Commit 87b2b5115330df24d4d3ae271e9b7ae809206e26

Authored by Braulio Bhavamitra
1 parent cae32b51
Exists in rails5

rails5: upgrade #update_all

db/migrate/20100920182433_change_action_tracker_record.rb
... ... @@ -2,7 +2,7 @@ class ChangeActionTrackerRecord < ActiveRecord::Migration
2 2 def self.up
3 3 rename_column(:action_tracker, :dispatcher_type, :target_type)
4 4 rename_column(:action_tracker, :dispatcher_id, :target_id)
5   - ActionTracker:Record.where(verb: 'publish_article_in_community').update_all verb: 'create_article'
  5 + ActionTracker::Record.where(verb: 'publish_article_in_community').update_all verb: 'create_article'
6 6 end
7 7  
8 8 def self.down
... ...
db/migrate/20131011164400_add_spam_to_task.rb
... ... @@ -3,7 +3,7 @@ class AddSpamToTask < ActiveRecord::Migration
3 3 change_table :tasks do |t|
4 4 t.boolean :spam, :default => false
5 5 end
6   - Task.update_all ["spam = ?", false]
  6 + Task.update_all spam: false
7 7 add_index :tasks, [:spam]
8 8 end
9 9  
... ...
db/migrate/20140221142304_move_title_virtual_field_to_name_in_uploaded_file.rb
... ... @@ -3,7 +3,6 @@ class MoveTitleVirtualFieldToNameInUploadedFile < ActiveRecord::Migration
3 3 UploadedFile.find_each do |uploaded_file|
4 4 uploaded_file.name = uploaded_file.setting.delete(:title)
5 5 UploadedFile.where(id: uploaded_file.id).update_all setting: uploaded_file.setting.to_yaml, name: uploaded_file.name
6   -
7 6 end
8 7 end
9 8  
... ...