I have an app where most of the data is stored in a collection of separate postgresql schemas in one database. I see that Ecto has some support for postgresql schemas (via prefixes), but noticed that when I run
mix ecto.dump the additional schemas are not dumped to structure.sql. Does anyone know if there is a way to tell Ecto what schemas to dump?
Ecto does not use Schemas as namespacing schema’s as I traditionally see, but rather it uses it as like copies of the main schema used for different sites of the same style or so (which I’ve not seen personally, so unsure how common it is).
Using schemas as namespacing in Ecto is quite painful, no cross-schema joins, etc… etc… And that goes down to ecto.dump. A quick look through the code seems to me that it does not have that ability, so it seems you will have an incomplete schema dump (thankfully my cross-schema access is accessing tables that are already there, but that also means that I cannot get rid of the schemas as they are outside of my control, Ecto is quite painful here…).