Hi All,
I am in the process of splitting my current install into two or more installs/databases. This should make it easier for me to use Drupal as I have too many domains to manage. So to do this, I copied the current database, as is, into a new one (and made the necessary fixes... select new domain "0", etc.). What I need to do next is to split the domains between the two existing databases. Hence, I need to delete redundant domains from both of them. Say they both have "x.com, y.com, z.com, a.com, b.com, and c.com," now I need to clean them up so that one would have only "x.com, y.com, z.com" while the other would have only "a.com, b.com, and z.com."
Is it sufficient to go directly to the domain table in the database and delete the records (rows) targeted for removal (phpMyAdmin makes it an easy task)? What will happen to content not associated with any domain (I take it it will go under the main domain (# 0)? Any advice on how to do this properly? Of course, it is far easier to go to phpMyAdmin and select the target domains and delete them with one click than to delete them one-by-one using Domain Access's interface.
I understand that permissions must be rebuilt after domains are deleted.
Thank you,
-DrupalFan
Comments
Comment #1
agentrickardBetter to script it in a hook_update_N() so you can call hook_domainupdate().
Comment #2
ctalley5 commentedThis is actually exactly what I'm doing now also. Say you were to go about this "physically"... without the hook update? I honestly have no clue how to run a hook update...
Comment #3
ctalley5 commentedOkay - well I did some research to give the hook update a shot... may as well learn, right!
I placed this exact code in the "domain.install" file...
I'm trying to erase the original Domain... so Domain id (0). After running update, I am seeing no changes at all.
Obviously I am missing something here. I've copied all the tables & folders... and this is in the new website's database which I am splitting off. Is it possible to delete that original domain id (0) this way?
Comment #4
agentrickardYour hook_update_N must be named for the module it belongs to. custom_update_6000() will only run from custom.install.
You also can't erase domain 0. It's required. The module will break without it.
Comment #5
ctalley5 commentedokay. well i guess there has to be another way then? i am splitting id#2 onto its own... and im done with everything except getting id#0 erased.
Thanks for you help!
Comment #6
agentrickardWell, normally, you would copy the db, delete all content and users not assigned to 'all affiliates' or domain 2 (if you want to do so), and then just uninstall the DA suite.
Comment #7
agentrickard