metamaps--metamaps/db/migrate/20151205205831_messages.rb
2015-12-11 14:23:41 -05:00

15 lines
343 B
Ruby

class Messages < ActiveRecord::Migration
def change
create_table :messages do |t|
t.text :message
t.references :user
t.integer :resource_id
t.string :resource_type
t.timestamps
end
add_index :messages, :user_id
add_index :messages, :resource_id
add_index :messages, :resource_type
end
end