Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverting schema based multi tenancy to single schema foreign key based multi tenancy #648

Open
bipashant opened this issue May 21, 2020 · 1 comment

Comments

@bipashant
Copy link

This is not an actual issue with theapartment.

Because of the drastic changes in our business requirements, we decided to revert the Postgres multi-tenancy implemented using the apartment gem.

We are now adding a foreign key in all the tables for the data isolation which is working great.
Our concern is how can we migrate the data from all the other schemas to the public maintaining foreign keys and references? We have nearly 100+ tables and some of the tables are highly associated with other tables. Does anybody have experience with this? Thanks

@tmvst
Copy link

tmvst commented Nov 28, 2021

Hey @bipashant have you figured it out? I'm starting the same process for a project and would love some tips. Did you keep Apartment for switching tenants in the single schema, or did you switch to something else entirely?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants