comparison db/migrate/20090401221305_update_enumerations_to_sti.rb @ 1526:404aa68d4227

Merge from live branch
author Chris Cannam
date Thu, 11 Sep 2014 12:46:20 +0100
parents dffacf8a6908
children
comparison
equal deleted inserted replaced
1493:a5f2bdf3b486 1526:404aa68d4227
1 class UpdateEnumerationsToSti < ActiveRecord::Migration 1 class UpdateEnumerationsToSti < ActiveRecord::Migration
2 def self.up 2 def self.up
3 Enumeration.update_all("type = 'IssuePriority'", "opt = 'IPRI'") 3 Enumeration.where("opt = 'IPRI'").update_all("type = 'IssuePriority'")
4 Enumeration.update_all("type = 'DocumentCategory'", "opt = 'DCAT'") 4 Enumeration.where("opt = 'DCAT'").update_all("type = 'DocumentCategory'")
5 Enumeration.update_all("type = 'TimeEntryActivity'", "opt = 'ACTI'") 5 Enumeration.where("opt = 'ACTI'").update_all("type = 'TimeEntryActivity'")
6 end 6 end
7 7
8 def self.down 8 def self.down
9 # no-op 9 # no-op
10 end 10 end