I've reinstalled a localhost Drupal 5 site under OS X (MAMP Pro) that originally had been running on a Linux server. It works.

To my surprise, the MySQL database for it shows not only all the expected druapl5_* tables, but corresponding drupal6_* tables.

(1) Why might that be so?

I tried deleting those drupal6_* tables from the database (using phpMyAdmin), but then the site doesn't work (links are dead & cannot log in -- get Internal Server Error messages). So I've restored the original database with all those drupal6_* tables, too.

(2) How will those seemingly extra tables affect things when I try to upgrade this site to Drupal 6 (and then from that to Drupal 7)?

Comments

bander2’s picture

If your tables are prefixed with drupal5_*, drupal6_* then Drupal is configured to use table prefixes. Those are arbitrary and chosen by the admin, so there is no reason to think they correspond to Drupal core versions. I am not sure about Drupal 5, but you can probably see this setting in sites/default/settings.php.

- Brendan

murray@math.umass.edu’s picture

The site files are for Drupal 5, as indicated by CHANGELOG.txt. And the site's sites/default/settings.php file shows:

db_prefix = 'drupal5_';

Nonetheless, the mysql database for the site has complete parallel sets of tables, drupal5_* and drupal6_*.

So why might those drupal6_* tables also be there? And what effect will this have later (when I upgrade to higher core version?

As I said, the thing that really confused me is that when I just dropped all the drupal6_* tables and reloaded the site, it would no longer work.

murray@math.umass.edu’s picture

Thanks to Bander2's comment about setting the table prefix in settings.php, I was able to diagnose and solve the problem:

By changing $db_prefix = 'drupal5_'; to $db_prefix = 'drupal6_'; and then reloading the site, I saw that the drupal6_* tables in fact were some experimental pages intended to try under Drupal core 6. From a command line I just dropped all those tables, change $db_prefix back 'drupal5_', and the Drupal core 5 site is just fine without those other tables.

(I'm just not sure why my original attempt to drop those tables from within phpmyadmin had caused the site to cause internal server errors.)