I have two rails application base1 and base2.
base1 uses db1 and have multiple tenants inside this database, its using apartment gem.
base2 is single tenant application and has database db2 as primary, and also uses data from db1.
Now the problem is, base2 application established connection to db1 and i can get the data db1 data in public tenant in base2 application.
How to get data from different schemas of db1 in base2 application?
base2app's models? Also, do db1 and db2 share any table names? I think i can help you here but i need more details. Also is there any writes being done on db1 from base 2 app?db1frombase2, you want to tell it to look specific table in specific schema(not in public). So my question is, when accessing db1 from base2, do you need to access same table data from different schemas or just want data from one schema? My second question was, if you need to do any writes on db1 from base2 app.self.table_name = 'schema_name.table_name'but this will force use of same schema for all queries. Does this work for you or you want to adjust schema when querying everytime?