📜  添加引用 rails 迁移 - Ruby 代码示例

📅  最后修改于: 2022-03-11 15:04:45.540000             🧑  作者: Mango

代码示例1
class AddUserToUploads < ActiveRecord::Migration
  def change
    add_reference :uploads, :user, index: true
  end
end