If you have a generated Phoenix model and you want to run a function before insert, something like setting a UUID of a user you should run code like this.
In your <modelname>.ex in your initial model code (begins with defmodule Reviewmymp.User do)
before_insert :put_uuid
A few lines under in the same file you can put your function such as:
def put_uuid(changeset) do Ecto.Changeset.put_change(changeset, :uuid, Ecto.UUID.generate()) end