Sha256: b51cc9f83779d71ae159e30c832376a1063910bf8d1cca9be99ade0694532464

Contents?: true

Size: 851 Bytes

Versions: 295

Compression:

Stored size: 851 Bytes

Contents

class AddMuckActivities < ActiveRecord::Migration
  
  def self.up
  
    create_table :activities, :force => true do |t|
      t.integer  :item_id
      t.string   :item_type
      t.string   :template
      t.integer  :source_id
      t.string   :source_type
      t.text     :content
      t.string   :title
      t.boolean  :is_status_update, :default => false
      t.boolean  :is_public, :default => true
      t.timestamps
    end

    add_index :activities, ["item_id", "item_type"]

    create_table :activity_feeds, :force => true do |t|
      t.integer :activity_id
      t.integer :ownable_id
      t.string  :ownable_type
    end

    add_index :activity_feeds, ["activity_id"]
    add_index :activity_feeds, ["ownable_id", "ownable_type"]
    
  end

  def self.down
    drop_table :activities
    drop_table :activity_feeds
  end
  
end

Version data entries

295 entries across 272 versions & 14 rubygems

Version Path
muck-activities-3.2.2 test/db/migrate/20090402033319_add_muck_activities.rb
muck-activities-3.2.2 db/migrate/20090402033319_add_muck_activities.rb
muck-activities-3.2.1 test/db/migrate/20090402033319_add_muck_activities.rb
muck-activities-3.2.1 db/migrate/20090402033319_add_muck_activities.rb
muck-services-3.3.3 test/db/migrate/20090402033319_add_muck_activities.rb
muck-profiles-3.1.4 test/db/migrate/20090402033319_add_muck_activities.rb
muck-auth-3.5.4 test/db/migrate/20090402033319_add_muck_activities.rb
muck-auth-3.5.3 test/db/migrate/20090402033319_add_muck_activities.rb
muck-profiles-3.1.3 test/db/migrate/20090402033319_add_muck_activities.rb
muck-auth-3.5.2 test/db/migrate/20090402033319_add_muck_activities.rb
muck-invites-3.4.1 test/db/migrate/20090402033319_add_muck_activities.rb
muck-activities-3.2.0 db/migrate/20090402033319_add_muck_activities.rb
muck-activities-3.1.1 db/migrate/20090402033319_add_muck_activities.rb
muck-activities-3.1.0 db/migrate/20090402033319_add_muck_activities.rb
muck-friends-3.0.3 test/rails_test/db/migrate/20090402033319_add_muck_activities.rb
muck-contents-3.0.2 test/rails_test/db/migrate/20090402033319_add_muck_activities.rb
muck-profiles-3.0.2 test/rails_test/db/migrate/20090402033319_add_muck_activities.rb
muck-services-0.1.47 test/rails_root/db/migrate/20090402033319_add_muck_activities.rb
muck-invites-3.0.0 test/rails_test/db/migrate/20090402033319_add_muck_activities.rb
muck-friends-3.0.2 test/rails_test/db/migrate/20090402033319_add_muck_activities.rb