1 2 3 4 5
class AddUserToBlog < ActiveRecord::Migration[7.0] def change add_reference :blogs, :user, foreign_key: true end end