Ask A Question

Notifications

You’re not receiving notifications from this thread.

Multi Tenant based database can connect into another database like multi-db connection?

vinay sharma asked in Databases

I've been working on one project that has already implemented a multi-tenant database setup using the apartment gem. and now I need to connect this multi-tenant database to my other project. I've connected the database successfully, but I've only got excluded model information, so I'm not able to switch the tenant subdomain. It shows this error.

ex : subdomain name = 'iso'

Apartment::TenantNotFound (Could not set search path to schemas, they may be invalid: "iso" "iso".)
Original error: ActiveRecord::StatementInvalid: Could not find schema iso

So how do I add those schemas to my other project? Is it possible or not? If anyone has an idea. Please share it. 

Thanks.

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.