Custom Ecto Table Names

I have a problem with table naming in Ecto…

  • I have many different Bounded Contexts in my app.

  • Each Bounded Context has it’s own Repo and Repo Config (although they may point to the same database).

  • Some Schema (and therefore tables) are in different Bounded Contexts but have the same name, e.g. Web.

  • I am trying to find the right way to rename my tables to be prefixed with the Bounded Context they are in. e.g. inter_web, spider_web,

  • However, my Repos already use a prefix for Tenanting.

I know that I could pass a tuple like {"inter_web", Web} in place of a Schema, but I was wondering if I’ve missed anything obvious or anyone could provide a better solution?


1 Like

Changed schema name directly. :frowning:

 schema "inter_web" do # ...

Brain asleep.