プログラミング

Rails db:migrate済みのテーブルにカラムを追加する

# rails generate migration add_[カラム名]_to_[テーブル名] [カラム名]:[型]
rails generate migration add_count_to_counts count:integer
rails db:migrate

ref:
https://stackoverflow.com/questions/4834809/adding-a-column-to-an-existing-table-in-a-rails-migration