diff db/migrate/20090614091200_fix_messages_sticky_null.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/20090614091200_fix_messages_sticky_null.rb	Mon Mar 17 08:57:04 2014 +0000
+++ b/db/migrate/20090614091200_fix_messages_sticky_null.rb	Thu Sep 11 12:46:20 2014 +0100
@@ -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