Ecto customize migration location

Is it possible to customize where Ecto looks for its migrations? I was thinking of Hex packages that may want to create database tables or apps in an umbrella, each which may define tables. In both cases, their migration files would be outside of the Ecto Repo’s priv/repo/migrations/ folder.

This is why such libraries provide a task very often which creates migrations in the projects migration folder.

For me as a user of the library this has the nice effect of telling me explicitly that the library will touch the database and how it will do so.

Thanks – can you point me to an example package that does this so I can study how it accomplishes this?

I can only support NobbZ. There can only ever be one place to handle migrations and that’s the app managing the database and (probably) it’s repo. As migrations are supposed to be immutable they shouldn’t be anywhere else out of control of said app. So if other places want to provide migrations either have means of generating migrations or – which still goes a bit against the “immutable” concept – have modules+functions handling sql, which the app can execute in it’s own migrations.

An example could be ex_money.