I have a rails app that uses postgres with multi tenancy using apartment.
I would like to receive write some parts of the json api using phoenix. This is primarily for a learning excercises but also to look at performance gains.
Can anyone please help in how I switch to a different tenant (postgres schema) on a per request basis ?
Because Ecto already has a concept of Schema, which refers to something completely different from postgres schemas, they refer to this feature as a Prefix. Take a look at the section called Query Prefix in the docs here.
Hi Sam,
Thanks for this. I have tried this but had compilation issues so gave up with it, but I will try again and persevere a bit more. Im totally new to exlixir - Im a ruby def primarily so everything is new