fixing wrong datatype on activity streams objectId
This commit is contained in:
parent
b881d7b3de
commit
5f29b77b1f
3 changed files with 14 additions and 3 deletions
|
|
@ -0,0 +1,11 @@
|
|||
class FixDataTypeForActivityStreamsObjectId < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_table :posts do |t|
|
||||
t.change :objectId, :string
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise ActiveRecord::IrreversibleMigration
|
||||
end
|
||||
end
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110930182048) do
|
||||
ActiveRecord::Schema.define(:version => 20111002013921) do
|
||||
|
||||
create_table "aspect_memberships", :force => true do |t|
|
||||
t.integer "aspect_id", :null => false
|
||||
|
|
@ -278,7 +278,7 @@ ActiveRecord::Schema.define(:version => 20110930182048) do
|
|||
t.integer "image_width"
|
||||
t.string "provider_display_name"
|
||||
t.string "actor_url"
|
||||
t.integer "objectId"
|
||||
t.string "objectId"
|
||||
t.string "root_guid", :limit => 30
|
||||
t.string "status_message_guid"
|
||||
t.integer "likes_count", :default => 0
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ describe ActivityStreams::Photo do
|
|||
describe '.from_activity' do
|
||||
before do
|
||||
@json = JSON.parse <<JSON
|
||||
{"activity":{"actor":{"url":"http://cubbi.es/daniel","displayName":"daniel","objectType":"person"},"published":"2011-05-19T18:12:23Z","verb":"save","object":{"objectType":"photo","url":"http://i658.photobucket.com/albums/uu308/R3b3lAp3/Swagger_dog.jpg","image":{"url":"http://i658.photobucket.com/albums/uu308/R3b3lAp3/Swagger_dog.jpg","width":637,"height":469}},"provider":{"url":"http://cubbi.es/","displayName":"Cubbi.es"}}}
|
||||
{"activity":{"actor":{"url":"http://cubbi.es/daniel","displayName":"daniel","objectType":"person"},"published":"2011-05-19T18:12:23Z","verb":"save","object":{"objectType":"photo","url":"http://i658.photobucket.com/albums/uu308/R3b3lAp3/Swagger_dog.jpg","id":"http://cubbi.es/p/2","image":{"url":"http://i658.photobucket.com/albums/uu308/R3b3lAp3/Swagger_dog.jpg","width":637,"height":469}},"provider":{"url":"http://cubbi.es/","displayName":"Cubbi.es"}}}
|
||||
JSON
|
||||
@json = @json["activity"]
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue