Hi Eileen, yes this way I had already tested and it works, but by keeping different usernames for same database doesn't mean there are two database. But I would like to keep two database one is for Post/Put and other database just for GET and reading large queries no matter both the database are same just name is changed, is this possible with connects_to() ?
On Wednesday, April 24, 2019 at 5:49:45 PM UTC+5:45, eileencodes wrote: > > Hey! > > I've implemented multiple databases in Rails 6, but I didn't implement > multiple *writers*. Rails doesn't know what your replica configuration is > going to be like so for purposes of local development you should use the > same database name for your primary and replica, and then have different > user names. In production you should also use the same name (they are the > same data you're accessing) with different usernames (one set to readonly) > but they shouldn't be in the same place. > > Hope that helps, > Eileen > >> -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-core+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-core@googlegroups.com. Visit this group at https://groups.google.com/group/rubyonrails-core. For more options, visit https://groups.google.com/d/optout.