rails migration add code example
Example 1: Add references rails migration
class AddUserToUploads < ActiveRecord::Migration
def change
add_reference :uploads, :user, index: true
end
end
Example 2: ruby on rails db migrate
rails db:migrate