diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 10:03:11 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 10:03:11 +0000 |
commit | 0bc3ef5014dd8611fb1771061b57529bf4920e8b (patch) | |
tree | 22195b5e912bb9e6d518e1117eac6b6a614a9ca2 /db/migrate/20090401221305_update_enumerations_to_sti.rb | |
parent | a5f028a2424e2e234081b6a84c496fb6c563ee9c (diff) | |
download | redmine-0bc3ef5014dd8611fb1771061b57529bf4920e8b.tar.gz redmine-0bc3ef5014dd8611fb1771061b57529bf4920e8b.zip |
Rails4: replace deprecated Relation#update_all at db migrations
git-svn-id: http://svn.redmine.org/redmine/trunk@12488 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/20090401221305_update_enumerations_to_sti.rb')
-rw-r--r-- | db/migrate/20090401221305_update_enumerations_to_sti.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db/migrate/20090401221305_update_enumerations_to_sti.rb b/db/migrate/20090401221305_update_enumerations_to_sti.rb index 50bd52010..031dd4656 100644 --- a/db/migrate/20090401221305_update_enumerations_to_sti.rb +++ b/db/migrate/20090401221305_update_enumerations_to_sti.rb @@ -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 |