2019-04-28 11:56:16 +03:00
|
|
|
class CreateFeedbacks < ActiveRecord::Migration[4.2]
|
2017-10-22 22:38:48 +03:00
|
|
|
def change
|
|
|
|
create_table :feedbacks do |t|
|
|
|
|
t.references :feedback_receiving, index: {name: :feedbacks_polymorphic_index}, polymorphic: true, null: false
|
|
|
|
t.string :author_email
|
|
|
|
t.integer :rating, null: false
|
|
|
|
t.text :comment, null: false
|
|
|
|
t.string :ip_address
|
|
|
|
t.string :session_id, index: true
|
|
|
|
|
|
|
|
t.timestamps null: false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|