What is the difference between `mix ecto.create` and `mix ash_postgres.create`.
In my early experiments, they seem to do the same thing, but not sure if I am missing something. Maybe this is mostly for the
--apis
flag thing?
https://ash-hq.org/docs/mix_task/ash_postgres/latest/ash_postgres-create3 Replies
The reason this question came up for me was that I commonly use
mix ecto.reset
to rebuilt and reseed but I wanted to know if I am missing something since I suspect it will not use the ash_postgress
version.Yep,
mix ash_postgres.create
is a thin wrapper around ecto.create
. The major difference other than specifying what to create by API rather than repo is that it will discover the repo list from the configured Ash APIs of all the applications in your project by default.Also handles multi-tenancy if you're using schema-based.