Why shouldn’t you use Elixir code in database migrations?

Elixir code used in migrations can cause troubles when we decide to start up our system with an empty database. To understand the problem, let’s take the same example as the one used in my previous article entitled “How to migrate live production data“.

Each year, triathlon races are held in many countries. Triathletes from around the world can sign up for one of 4…