Tambahkan referensi migrasi rel
class AddUserToUploads < ActiveRecord::Migration
def change
add_reference :uploads, :user, index: true
end
end
Adventurous Ant
class AddUserToUploads < ActiveRecord::Migration
def change
add_reference :uploads, :user, index: true
end
end
add_reference :uploads, :user, foreign_key: true