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-create
Ash HQ
Mix Task: ash_postgres.create
View the documentation for ash_postgres.create on Ash HQ.
3 Replies
zorn
zornOP2y ago
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.
\ ឵឵឵
\ ឵឵឵2y ago
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.
frankdugan3
frankdugan32y ago
Also handles multi-tenancy if you're using schema-based.

Did you find this page helpful?