Comments (5)
I think to fix this problem we'll need to change import_database_schema
to use a new method which only connects to the one schema, not all schemas.
from apartment.
I have a commit in my fork that fixes this problem for me.
from apartment.
Is there a reason that you have public in persistent schemas? That option
is used to always leave a schema is the search path no matter what tenant
you switch to. We use it to ensure that the hstore schema is always
available.
By having public in there, you're saying you always want public in the
search path, thus when it loads schema.rb, it does a force create of tables
which destroys any that exist first. Can you give me the use case for using
public there?
brad
(on my phone)
On 2013-01-22 4:28 AM, "Ryan Bigg" [email protected] wrote:
I have a commit in my fork that fixes this problem for me.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/35#issuecomment-12536430.
from apartment.
I actually got around this problem without using persistent_schemas. The issue I was trying to solve with it initially was because my join table (subscribem_accounts_users) lookup wasn't being scoped to the right schema (public).
What I needed to do was to create a new model for this table and then add that model to the excluded_models
list in apartment.
Thank you for the great gem. I just emailed 100 people with instructions on how to use it. Hope you don't mind.
from apartment.
Hmm.. didn't even know about that book of yours, will have to check it out.
from apartment.
Related Issues (20)
- Reverting schema based multi tenancy to single schema foreign key based multi tenancy HOT 1
- Rails 5: ActiveRecord::ConnectionNotEstablished: No connection pool with id primary found HOT 1
- Switch from subdomains to generic elevator HOT 1
- how can I redirect to tenant on creation? No devise or warden
- Doesn't work with Rails 6 HOT 1
- warning: instance variable not initialized HOT 1
- write RSpec tests for APIs HOT 1
- ActiveRecord::StatementInvalid: PG::UndefinedObject: ERROR: operator class "gin_trgm_ops" does not exist for access method "gin" HOT 1
- Apartment 2.2 is not compatible with ActiveRecord 3
- raw SQL doesn't get interpreted by apartment to use schemas
- 2.2.1 not compatible with Rails 6.1 HOT 1
- excluded_models does not works with db:setup HOT 1
- Making a request to an ActiveStorage resource fails occasionally
- Direct uploads writing to random tenants HOT 1
- Fresh install on Rails 7.0.4 can't setup HOT 2
- Not able to configure New Relic for each apartment separately
- Not able find a solution for multi db connection HOT 2
- Find with Parameter 1 but SQL query taking it as NULL
- update it .... HOT 1
- Error when trying to generate apartment initializer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apartment.