This is a memo about how to add a column to a table that has already been db:migrated in Rails.
Use the rails generate migration command as follows.
For example, rails generate migration add_count_to_counts count:integer.
# rails generate migration add_[column_name]_to_[table_name] [column_name]:[type]
rails generate migration add_count_to_counts count:integer
rails db:migrate
Adding a column to an existing table in a Rails migration - Stack Overflow