Mercurial > hg > soundsoftware-site
diff 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 |
line wrap: on
line diff
--- a/db/migrate/20090401221305_update_enumerations_to_sti.rb Mon Mar 17 08:57:04 2014 +0000 +++ b/db/migrate/20090401221305_update_enumerations_to_sti.rb Thu Sep 11 12:46:20 2014 +0100 @@ -1,8 +1,8 @@ class UpdateEnumerationsToSti < ActiveRecord::Migration def self.up - Enumeration.update_all("type = 'IssuePriority'", "opt = 'IPRI'") - Enumeration.update_all("type = 'DocumentCategory'", "opt = 'DCAT'") - Enumeration.update_all("type = 'TimeEntryActivity'", "opt = 'ACTI'") + Enumeration.where("opt = 'IPRI'").update_all("type = 'IssuePriority'") + Enumeration.where("opt = 'DCAT'").update_all("type = 'DocumentCategory'") + Enumeration.where("opt = 'ACTI'").update_all("type = 'TimeEntryActivity'") end def self.down