æ¸ãæ¹ ä¾ã¨ãã¦ãmicropostsãã¼ãã«ã«user_idã«ã©ã ãå¤é¨ãã¼ã¨ãã¦è¨å®ãããã¨æãã¾ãã ï¼ãã®ä¾ã§ã¯ãä»ã«contentã«ã©ã ããã¼ãã«ã«è¨å®ãã¦ãã¾ããï¼ æ®éã« user_id ã«ã©ã ãä½æ class CreateMicroposts < ActiveRecord::Migration def change create_table :microposts do |t| t.string :content t.integer :user_id t.timestamps end add_index :microposts, [:user_id, :created_at] end end references ã使ã references ã¯user_idã«ã©ã ãä½æãã¾ãã class CreateMicroposts < ActiveRecord::Migrati
{{#tags}}- {{label}}
{{/tags}}