socialforge/db/migrate/20151216025539_create_at_me...

16 lines
366 B
Ruby
Raw Normal View History

2015-12-17 15:14:52 +08:00
class CreateAtMessages < ActiveRecord::Migration
def change
create_table :at_messages do |t|
t.references :user
t.integer :at_message_id
t.string :at_message_type
t.boolean :viewed, :default => false
t.string :container_type
t.integer :container_id
t.timestamps
end
add_index :at_messages, :user_id
end
end