Can we have multiple database instances on a Ruby project using Hanami?

82 views Asked by At

Currently we have a single Aurora Postgresql db instance that we are interacting with but I would like to add one more db instance so that we can read from one database and write to another(existing one). We are using Hanami v1.3 and the project is in ruby.

I am trying to find documentation/resources on how to implement this and is it possible to do so?

2

There are 2 answers

0
Mahmood Ahmad On

This is not possible in Hanami v1.3, checkout the following link: https://github.com/hanami/hanami/issues/1028

0
wuarmin On

In hanami 2 (already in beta ) it is possible through rom-rb (you will love to work with it). I would not recommend to start a new project with hanami 1.3. I would go definitely with 2.0.