lib/generators/notable/templates/create_requests.rb.tt in notable-0.3.1 vs lib/generators/notable/templates/create_requests.rb.tt in notable-0.3.2
- old
+ new
@@ -1,12 +1,11 @@
class <%= migration_class_name %> < ActiveRecord::Migration<%= migration_version %>
def change
create_table :notable_requests do |t|
t.string :note_type
t.text :note
- t.integer :user_id
- t.string :user_type
+ t.references :user, polymorphic: true
t.text :action
t.integer :status
t.text :url
t.string :request_id
t.string :ip
@@ -14,9 +13,7 @@
t.text :referrer
t.text :params
t.float :request_time
t.timestamp :created_at
end
-
- add_index :notable_requests, [:user_id, :user_type]
end
end