5

I know by default Apartment will create same tables on both public and tenant database. And most of tables on public database are no use, empty tables. I also know that tenant database are depending on schema.rb

But I wonder if we can have different schema for public and tenant database? For example I have 5 tables: SignUp, Company, User , Task and Matter.

If I want the main database (public) only have SignUP,COmpany and User table, and tenants only have Task and Matter tables, is it possible to do that?

Ankita Agrawal
  • 422
  • 5
  • 20

1 Answers1

4

Currently, this isn't possible with the apartment gem. This issue has been brought up a couple of times, see below.

Apartment - Github issue

treiff
  • 1,246
  • 14
  • 24
  • 1
    yes,i know that. Is their is any other options/gems available for doing this? – Ankita Agrawal Sep 02 '15 at 04:58
  • AFAIK, no. I was looking to have a similar architecture as you describe above but ended up having a single schema. I'm sure it's possible in some way although probably would involve rewriting a bunch of activerecord. – treiff Sep 02 '15 at 13:33