diff options
author | Raphael Sofaer <raphael@joindiaspora.com> | 2011-06-01 23:02:14 +0400 |
---|---|---|
committer | Raphael Sofaer <raphael@joindiaspora.com> | 2011-06-01 23:02:14 +0400 |
commit | 158401e17d8e79e0334cd3849165c903029cec79 (patch) | |
tree | ffd2615a5d421047d1c4e18f2198641e09941f82 /db | |
parent | 5455aedf1d67065d9f89f7e26d0372047080178e (diff) |
ActiveRecord::Base.record_timestamps didn't actually stop timestamps from being updated
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20110527135552_photo_status_message_association_on_guid.rb | 4 |
1 files changed, 2 insertions, 2 deletions
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 19f7105e3..a48759d71 100644 --- a/db/migrate/20110527135552_photo_status_message_association_on_guid.rb +++ b/db/migrate/20110527135552_photo_status_message_association_on_guid.rb @@ -7,7 +7,7 @@ class PhotoStatusMessageAssociationOnGuid < ActiveRecord::Migration def self.up add_column :posts, :status_message_guid, :string - ActiveRecord::Base.record_timestamps = false + Post.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? @@ -27,7 +27,7 @@ class PhotoStatusMessageAssociationOnGuid < ActiveRecord::Migration def self.down add_column :posts, :status_message_id, :integer - ActiveRecord::Base.record_timestamps = false + Post.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? |