However, because some of these types aren’t shared between the different SQL
databases, most Object Relation Mapping like Ruby on Rails’s ActiveRecord and
database wrappers (e.g. Elixir’s Ecto) don’t support them.

Thankfully, Ecto allows us to define our custom types that can represent an
unknown database type. We’ll now try to implement one to represent timestamp
ranges.

Let’s say we need to schedule chores between different members of a team in a spaceship. 1

The simplest way to do this would be to store the range of our chore and who is
assigned to it. With Ecto, the migration creating this table would look like this: