I have a few Drupal 7 sites running on a multisite setup. They each have their own database, and there's a "shared" database used by all of them, which contains user data, date formats, filters and some other data that is shared across all of the sites.
Nodes and taxonomy are not shared, but I am looking at changing that so they are, and using a taxonomy vocab as a means of specifying which site each node is associated with.
I don't have a problem setting that up as I have a nice little database include that handles database credentials and prefixing, but there is one drawback with this setup and that is controlling which database any given module should create new tables in. I know that in order to have all sites use a single
node table, I should also share the content types and fields - but I am going to run into issues when creating new fields on content types, as their respective tables will naturally be created in the site's default database and not the shared one.
So, I suppose my question is: how can I specify what the default database should be on a per-module basis?
P.S. I did consider using Domain Access to achieve this, but that doesn't seem to be suitable in this case as each site uses a separate database already, and I'm not looking to share themes, site config, blocks, views, panel data, paths, etc.