I thought I'd add my multi tenancy implementation here as it might prove useful for others. We currently have to separate our customer data into their own databases, but not for everything. Our microservices need to know where to store their data with our many IoT devices reporting in.
I choose to only perform model actions on a tenant database via callbacks and proxies. We get a Tenant object from the tenant manager which allows us to perform actions on the tenant in a manner similar to a transaction callback.
const User = use('App/Models/User');
const Device = use('App/Models/Device');
const TenantManager = use ('App/Services/TenantManager');
const tenant = TenantManager.tenant('adonis');