summaryrefslogtreecommitdiffstats
path: root/db/migrate/20090614091200_fix_messages_sticky_null.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-07 10:03:11 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-07 10:03:11 +0000
commit0bc3ef5014dd8611fb1771061b57529bf4920e8b (patch)
tree22195b5e912bb9e6d518e1117eac6b6a614a9ca2 /db/migrate/20090614091200_fix_messages_sticky_null.rb
parenta5f028a2424e2e234081b6a84c496fb6c563ee9c (diff)
downloadredmine-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/20090614091200_fix_messages_sticky_null.rb')
-rw-r--r--db/migrate/20090614091200_fix_messages_sticky_null.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20090614091200_fix_messages_sticky_null.rb b/db/migrate/20090614091200_fix_messages_sticky_null.rb
index cbe741732..fcb8b4504 100644
--- a/db/migrate/20090614091200_fix_messages_sticky_null.rb
+++ b/db/migrate/20090614091200_fix_messages_sticky_null.rb
@@ -1,6 +1,6 @@
class FixMessagesStickyNull < ActiveRecord::Migration
def self.up
- Message.update_all('sticky = 0', 'sticky IS NULL')
+ Message.where('sticky IS NULL').update_all('sticky = 0')
end
def self.down