Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails - Apartment gem - Different schema for public and tenant database

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?

like image 538
Ankita Agrawal Avatar asked Sep 27 '22 23:09

Ankita Agrawal


1 Answers

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

Apartment - Github issue

like image 60
treiff Avatar answered Oct 03 '22 20:10

treiff