Project

General

Profile

« Previous | Next » 

Revision 13455

Added by Toshi MARUYAMA over 10 years ago

db migrate: replace deprecated Relation#update_all at 20091225164732_remove_enumerations_opt.rb (#18132)

View differences:

sandbox/rails-4.1/db/migrate/20091225164732_remove_enumerations_opt.rb
5 5

  
6 6
  def self.down
7 7
    add_column :enumerations, :opt, :string, :limit => 4, :default => '', :null => false
8
    Enumeration.update_all("opt = 'IPRI'", "type = 'IssuePriority'")
9
    Enumeration.update_all("opt = 'DCAT'", "type = 'DocumentCategory'")
10
    Enumeration.update_all("opt = 'ACTI'", "type = 'TimeEntryActivity'")
8
    Enumeration.where("type = 'IssuePriority'").update_all("opt = 'IPRI'")
9
    Enumeration.where("type = 'DocumentCategory'").update_all("opt = 'DCAT'")
10
    Enumeration.where("type = 'TimeEntryActivity'").update_all("opt = 'ACTI'")
11 11
  end
12 12
end

Also available in: Unified diff