Skip to content

Instantly share code, notes, and snippets.

@tigawa
Created February 14, 2013 03:44
Show Gist options
  • Save tigawa/4950475 to your computer and use it in GitHub Desktop.
Save tigawa/4950475 to your computer and use it in GitHub Desktop.
rails カラムを後から追加する方法
migrationの後ろに、追加すれば項目の追加、削除ができる。
add_XXX_to_TABLE
remove_XXX_TO_TABE
※XXXXの部分は無視されるらしいよ
#実行例
#rails g migration add_quantiy_to_line_items quantity:integer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment