Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
例えば
rename_column :user, :email_address, :email
名前は何から変更され、何に名前が変更されますか?ここには、私を完全に混乱させる3つの属性があります。
:user-テーブル名
:email_address -from(旧名)
:email -to(新しい名前)
1つの移行ファイル(単一の移行)では、一度に複数のテーブルにアラートを送信できます。そのため、引数としてテーブル名を渡すと、右側のテーブルの列の名前が変更されるようになります。