al13ntown/db/migrate/20260824111408_add_blog_id_to_posts.rb

6 lines
148 B
Ruby
Raw Permalink Normal View History

2026-08-24 20:12:41 +00:00
class AddBlogIdToPosts < ActiveRecord::Migration[8.1]
def change
add_reference :posts, :blogs, null: false, foreign_key: true
end
end