I have been working on upgrading our main site to Drupal 7 for a number of months now, and during that time we have added two multi-sites to our Drupal 6 installation. I am now attempting to figure out how to add those sites to my Drupal 7 testing environment and upgrade them. I searched around and was unable to find specific instructions for upgrading a multi-site, so I basically used the upgrade path for a regular installation. I disabled all non-core modules, set themes to garland, and put the site in maintenance mode. All this was done in my Drupal 6 dev environment, and I then imported the database to the Drupal 7 environment. I then ran update.php for the multi-site in the D7 environment, and that's where it fails. I get the error "DatabaseSchemaObjectExistsException: Cannot add field sessions.ssid: field already exists. in DatabaseSchema_mysql->addField()". Can anybody tell me what I'm missing? I've tried a couple of different variations on this process and done a lot of searching around and can't seem to find a solution.

Comments

VM’s picture

I'd break the sites back out to single installs, upgrade them to D7, then flip em back to multisites once tested.

As an aside, multisite functionality may have been altered in D7 as there is now a sites.php file in play in the sites folder

dswier’s picture

That sounds like a good idea. I'll try that when I get a chance and let you know how it goes. I was actually aware of the sites.php file, and I think I did configure it correctly.

Also, I would guess that this process would go more smoothly if my multisites were integrated with the primary site prior to upgrading, which they will be when I finally do the upgrade for real. I've been working with a pretty old copy of our site that I upgraded because I want to get all the modules and configuration working well so that I can reuse them in future upgrade attempts. I figured trying to update to the more current version that includes the multisites would potentially introduce new issues and cause me to have to recreate some of my work.

dswier’s picture

What I ended up doing was upgrading a fresh copy of my site with no contrib modules. Then I imported the multisites and ran update.php for them, and it worked fine. So I guess my problem was either something module related, or it's also possible I had done something wrong with my database import.

jfm30204’s picture

dswier - I was wondering if you could supply a little more detail - step by step, if possible - about how you finally did the upgrade. I've been putting it off for months.

dswier’s picture

While I have not successfully upgraded our production site yet, I have had several mostly successful attempts at upgrading my dev environment. I started out just following the suggested upgrade instructions at http://drupal.org/node/570162 to initially get my environment on D7. I've spent the past several months working through various theme and module related bugs, and my plan is to finally upgrade the production environment next week. Just last week I came across this article, and I used the instructions under upgrade manually. If you have your site well prepared, this seems like the way to go. When using this method with multisites, you should update them right after you do the main update, while you're still only working with the core files. In my case, I had been working on smoothing out all the problems in my original test environment, so I had my theme and all the D7 modules I would need in there. Actually since I had working D7 versions of the themes I was using, I was even able to skip the change all themes to Garland step(I probably shouldn't recommend this though). So after the initial update for all the sites, I just moved all those modules and themes to my new installation and ran update.php again. I found http://drupal.org/node/593406#comment-6174916 to be an easy way to get all my modules re-enabled after the upgrade. Note that if you do this you'll probably need to remove some incompatible D6 modules from the list in order to make the command run successfully.

I honestly can't be too specific with how you should upgrade, because every site is different and there will be different challenges to deal with. For the site I'm working with, I think the biggest problems have been taxonomy related, since taxonomy changed a lot between D6 and D7. I've also struggled a bit getting our theme working properly and converting some of our custom code for the new database API. I think the biggest factors in upgrade difficulty is which modules you are using, how you are using taxonomy, and if you're doing anything CCK related that isn't naturally handled by Fields.