From af711c2568cf10fb8d34348e754b5337b1b68fdc Mon Sep 17 00:00:00 2001 From: Reinier Balt Date: Sun, 8 Feb 2009 22:08:49 +0100 Subject: [PATCH] also update sql in migration for mysql4 users --- db/migrate/043_add_updated_at_to_todos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/043_add_updated_at_to_todos.rb b/db/migrate/043_add_updated_at_to_todos.rb index ec14720a..abf8dc97 100644 --- a/db/migrate/043_add_updated_at_to_todos.rb +++ b/db/migrate/043_add_updated_at_to_todos.rb @@ -2,7 +2,7 @@ class AddUpdatedAtToTodos < ActiveRecord::Migration def self.up add_column :todos, :updated_at, :timestamp execute 'update todos set updated_at = created_at where completed_at IS NULL' - execute 'update todos set updated_at = completed_at where NOT completed_at IS NULL' + execute 'update todos set updated_at = completed_at where NOT (completed_at IS NULL)' end def self.down remove_column :todos, :updated_at