2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'lib/generators/templates/create_messages.rb', line 2
def self.up
create_table :messages, :force => true do |t|
t.string :name
t.string :subject
t.string :email
t.text :body
t.string :messagable_type
t.integer :messagable_id
t.integer :user_id
t.string :image_file_name
t.string :image_content_type
t.integer :image_file_size
t.datetime :image_updated_at
t.timestamps
end
add_index :messages, :messagable_type
add_index :messages, :messagable_id
end
|