the exception message is actually pretty good.. you need to use a fragment - see docs for solution
https://hexdocs.pm/ecto/Ecto.Migration.html#fragment/1