For a project, i need to be able to deploy it with either MySQL or MongoDB (I'm currently using mongoid for that). My question is, is it possible to make "standard" models (especially about the relations) to use either one database type or the other (It's not using both at the same time, but the possibility to start the project with one of them).
Also, is there a way to make the model know which db use, by like, testing the possible connection (ex, try the mysql connection, if it's not working, use the MongoDB one, or something like that)