From 7057f77924823e8724b72daabe6bdc922e6947de Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jonne=20Ha=C3=9F?= <me@mrzyx.de>
Date: Wed, 31 Jul 2013 20:57:01 +0200
Subject: [PATCH] fix ActivityStreams::Photo migration

---
 ...130717104359_migrate_activity_stream_to_status_message.rb | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb b/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb
index b993babd2f..c02282f813 100644
--- a/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb
+++ b/db/migrate/20130717104359_migrate_activity_stream_to_status_message.rb
@@ -1,8 +1,9 @@
 class MigrateActivityStreamToStatusMessage < ActiveRecord::Migration
+  class Post < ActiveRecord::Base; self.inheritance_column = false; end
   def up
-    posts_stream_photos = Post.where(:type => 'ActivityStreams::Photo')
+    posts_stream_photos = Post.where(type: 'ActivityStreams::Photo')
     posts_stream_photos.each do |p|
-      p.update_attributes(:text => "#{p.text} ![](#{p.image_url})", :type => "StatusMessage", without_protection: true)
+      p.update_attributes({text: "#{p.text} ![](#{p.image_url})", type: "StatusMessage"}, without_protection: true)
     end
   end
 
-- 
GitLab