ExTenant
Multi Tenancy Library - based on foreign key relationship
Features for Querying the database
- Overrides the Ecto callback
default_optionsto inject thetenant_id - Overrides the Ecto callback
prepare_queryto inject thetenant_idinto a where clause
Installation
- The package can be installed by adding
ex_tenantto your list of dependencies inmix.exs:
def deps do
[
{:ex_tenant, "~> 0.1.1"}
]
end- Run:
mix deps.get && mix deps.compileto retrieve dependencies & compile