Patterns for making seeds idempotent?

You are totally right: when the seeds change, we should ecto.reset the database.

I am asking because of other considerations: I want to run a database preparation script automatically as part of a devcontainer creation process. But the database may exist already. Rails has a db:prepare command that is idempotent. If there was a mix/ecto/phoenix equivalent of that, I would be happy. See this other forum question about that. But if there is no such equivalent, my seeds should be idempotent, hence my question if there are established patterns for this.