maxneuvians / phoenix_dependency_test

Example of how to use a phoenix app as a mix dependency
0 stars 0 forks source link

Using ecto #1

Open gitviola opened 7 years ago

gitviola commented 7 years ago

Is there a way to use ecto in the child project?

maxneuvians commented 7 years ago

Good question - ideally you would just be able to use the Ecto library that is required through the parent. I think I might not have tested that initially because I wanted to keep it as simple as possible to see if it even works. I think the other problem this brought up was how to handle migrations - do you insert them with the child or manage them with the parent? I think if you keep them in a separate databases you could manage them with the child but you get into all sorts of trouble with configs. It might be worthwhile to see how rails engines deal with this issue. Also this is a good project that does something similar: https://github.com/smpallen99/ex_admin