Why you may ask? Because i have built the app on mysql and need to start using postgres for GIS component of my app only. Eventually i will migrate to postgres completely but in the mean time would like to know if this is possible
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If for instance you, in your database.yml have something like this (don’t really recall the correct attributes, but I think you get the idea):
Then, you could add
in the models that should use the Postgres database.
Of course, it might be easier to create an abstract class and make all the models to use that one instead since that is more DRYer.
Or, since you are planning on migrating to Postgres eventually, you probably should do the opposite, make the Postgres database default and change the connection for the MySQL.