From 787a5ae7494bbb1913fd34f57048ddc49c3bda47 Mon Sep 17 00:00:00 2001 From: MrZYX Date: Fri, 27 May 2011 19:57:51 +0200 Subject: [PATCH] don't update timestamps in the migration --- .../20110527135552_photo_status_message_association_on_guid.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/migrate/20110527135552_photo_status_message_association_on_guid.rb b/db/migrate/20110527135552_photo_status_message_association_on_guid.rb index d5b442588..81ae491c8 100644 --- a/db/migrate/20110527135552_photo_status_message_association_on_guid.rb +++ b/db/migrate/20110527135552_photo_status_message_association_on_guid.rb @@ -7,6 +7,7 @@ class PhotoStatusMessageAssociationOnGuid < ActiveRecord::Migration def self.up add_column :posts, :status_message_guid, :string + ActiveRecord::Base.record_timestamps = false photos = Post.where(Post.arel_table[:status_message_id].not_eq(nil).and(Post.arel_table[:type].eq('Photo'))) photos.each do |photo| if Post.where(:id => photo.status_message_id).exists? @@ -25,6 +26,7 @@ class PhotoStatusMessageAssociationOnGuid < ActiveRecord::Migration def self.down add_column :posts, :status_message_id, :integer + ActiveRecord::Base.record_timestamps = false photos = Post.where(Post.arel_table[:status_message_guid].not_eq(nil).and(Post.arel_table[:type].eq('Photo'))) photos.each do |photo| if Post.where(:guid => photo.status_message_guid).exists?