Sha256: 5705b74bf7fba51672b681f86b7fbe6c200d72e8b074e07a4a7da41ce1bfc042
Contents?: true
Size: 653 Bytes
Versions: 92
Compression:
Stored size: 653 Bytes
Contents
# Migration responsible for creating a table with activities class CreateActivities < ActiveRecord::Migration # Create table def self.up create_table :activities do |t| t.belongs_to :trackable, :polymorphic => true t.belongs_to :owner, :polymorphic => true t.string :key t.text :parameters t.belongs_to :recipient, :polymorphic => true t.timestamps end add_index :activities, [:trackable_id, :trackable_type] add_index :activities, [:owner_id, :owner_type] add_index :activities, [:recipient_id, :recipient_type] end # Drop table def self.down drop_table :activities end end
Version data entries
92 entries across 87 versions & 5 rubygems