comparison db/migrate/20090401221305_update_enumerations_to_sti.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents 513646585e45
children
comparison
equal deleted inserted replaced
1516:b450a9d58aed 1517:dffacf8a6908
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