13 lines
371 B
Ruby
13 lines
371 B
Ruby
class CreateActivities < ActiveRecord::Migration
|
|
def change
|
|
create_table :activities do |t|
|
|
t.integer :act_id, :null => false
|
|
t.string :act_type, :null => false
|
|
t.integer :user_id, :null => false
|
|
end
|
|
add_index :activities, :user_id
|
|
add_index :activities, [:act_id, :act_type]
|
|
add_index :activities, [:user_id, :act_type]
|
|
end
|
|
end
|