Closed stevenharman closed 7 years ago
Love it! We have talked about 3rd base before. Technically we could step and repeat all the things that made this work. I do wonder if you need a true 3rd base tho. Does that "some-other-thing-I-don't-yet-fully-understand" DB require a schema and full participation in the rake tasks? If not, then a good ol' fashion abstract connection class would work. See: https://gist.github.com/metaskills/4065702
If it does need full database task support, then we would have to go with extending SecondBase which may be just fork it and rename everything :)
Wow! Someone did it a few months ago: https://github.com/sagittaros/thirdbase
I ended up prototyping this at one point and pulled back from it. Without some major changes landed in Rails core, you end up having to metaprogram almost everything in the gem to support an n number of databases. This turns into an unintelligible mess very fast, and is impossible to debug.
I feel you have three options here:
You might also want to look into the Octopus Gem.
@jomei Thanks for posting! I made an issue on your repo to sort out the LICENSE issue. Cheers. https://github.com/jomei/multibase/issues/1
@metaskills does this feature implemented in secondbase already ?
Oh no... if you need a third, fork and rename :)
I'm not trolling. Really. I have inherited an app which has THREE (3) different DBs. The primary is MySQL. And then there are two different PostreSQL DBs used for metrics and some-other-thing-I-don't-yet-fully-understand. The point being, we need to manage 3 different DBs. The current "solution" for that is manually creating various DBs, running migrations for those other DBs from the main migrations, etc... It's a Bad Time™.
I'd like to use SecondBase, but we have that darned ThirdBase too. How tied to only two DBs is this Gem? Would adding support for a third (or arbitrary number, I suppose) be totally absurd?