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

How to map to a custom postgres schema? #472

Closed
AlexVKO opened this issue Jan 25, 2018 · 4 comments
Closed

How to map to a custom postgres schema? #472

AlexVKO opened this issue Jan 25, 2018 · 4 comments

Comments

@AlexVKO
Copy link

AlexVKO commented Jan 25, 2018

Hello Guys,
I'm using PostgreSQL and I'm having a hard time to make Hanami search for tables inside a custom schema instead of the public...

How can I do that?

@mereghost
Copy link
Contributor

mereghost commented Jan 27, 2018

Hey there, @AlexVKO !

Well, if I'm not mistaken rom-rb does not still support multiple schemas, and we use it under the hood. That being said, postgres has a search_path setting that can be passed over during connection (postgres://localhost/rom_sql?search_path=schema1,schema2).

The original issue (and this solution) can be found over rom-rb/rom-sql#163 .

@AlfonsoUceda
Copy link
Contributor

Hi @AlexVKO sorry fo the trouble, did @mereghost's suggestion work fine?

@AlexVKO
Copy link
Author

AlexVKO commented Mar 20, 2018

Hello,

Sorry for the delay.

The search path was not doable for us, due de fact we have tables with the same name in different schemas, some examples:

- dropshipper.users
- supplier.users

- store.orders
- supplier.orders

and many more...

Unfortunately we moved from Hanami for this and other reasons, we we're spending a lot of time for doing things that should be faster, and you know, in a startup real world we need to deliver things fast to hear feedback and etc, it was not ideal.

I'm not saying that Hanami is bad(I do like Hanami alot), but it was not been the suitable choice for the moment and for the team.

I'm closing this. Thank you guys.

@AlexVKO AlexVKO closed this as completed Mar 20, 2018
@AlfonsoUceda
Copy link
Contributor

@AlexVKO thanks for your feedback because it is valuable for us. Can you tell us more reasons about that decision? we need to improve and that would be awesome.

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

No branches or pull requests

4 participants