In the following migration, we are adding an Action
model to our todo list
application. Each action will belong to a single Project
. What database
feature could we use to improve the performance of the t.references
relationship?
class CreateActions < ActiveRecord::Migration
def change
create_table :actions do |t|
t.string :title
t.references :project
t.timestamps null: false
end
end
end