Did you know that since Rails 6.1, you can easily add a column of type interval if you use Postgres? This can be convenient if you have for example a model for recurring events with a specific duration like 5 days.
class CreateEvents < ActiveRecord::Migration[6.1]
def change
create_table :events do |t|
t.string :name
t.interval :duration
t.timestamps
end
end
end