News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

"Duplicate Key Name" During Upgrade

Started by von Corax, June 02, 2022, 12:47:59 PM

Previous topic - Next topic

von Corax

It should be an exact duplicate. I followed the instructions for moving to a new host.

von Corax

This is just wild speculation on my part, but my test box is running Ubuntu 16 while the production box is running Ubuntu 14. Is there any possibility that might account for the difference in behaviour between the two installations?

Doug Heffernan

Quote from: von Corax on June 04, 2022, 06:03:49 PMIt should be an exact duplicate.

It should be or it is, because there is a difference.

Quote from: von Corax on June 06, 2022, 02:21:07 PMThis is just wild speculation on my part, but my test box is running Ubuntu 16 while the production box is running Ubuntu 14. Is there any possibility that might account for the difference in behaviour between the two installations?

Assuming that you have mirrored an exact copy of your main forum to the test forum, and there the upgrade to 2.0.19 goes through without any issues, but the upgrade of your main forum throws different errors, then it stands to reason that the difference between your test and main forum 's envirement could be the cause.

How did the upgrade go btw? Did it complete successfully?

von Corax

Quote from: Doug Heffernan on June 06, 2022, 04:12:26 PM
Quote from: von Corax on June 04, 2022, 06:03:49 PMIt should be an exact duplicate.

It should be or it is, because there is a difference.

I know; "In theory there's no difference between theory and practice..." I dumped the database and tarred the /forum directory, and it worked after I installed it on the test box, so it's as exact a copy as I know how to make it.

Quote from: Doug Heffernan on June 06, 2022, 04:12:26 PM
Quote from: von Corax on June 06, 2022, 02:21:07 PMThis is just wild speculation on my part, but my test box is running Ubuntu 16 while the production box is running Ubuntu 14. Is there any possibility that might account for the difference in behaviour between the two installations?

Assuming that you have mirrored an exact copy of your main forum to the test forum, and there the upgrade to 2.0.19 goes through without any issues, but the upgrade of your main forum throws different errors, then it stands to reason that the difference between your test and main forum 's envirement could be the cause.

How did the upgrade go btw? Did it complete successfully?


It did not. I'm still hitting the "Table 'smf_pm_recipients' already exists" error. Does the definition of that table change, or is it only the name?

Arantor

The name only changes during the 1.0 to 1.1 upgrade. It has 'already happened' by the time the upgrade is being started.

von Corax

Quote from: Arantor on June 07, 2022, 02:47:34 PMThe name only changes during the 1.0 to 1.1 upgrade. It has 'already happened' by the time the upgrade is being started.
What about the 1.1 to 2.0 upgrade? I'm wondering if renaming the table might get me past the problem. I'm also wondering, if I mangle the table by accident, if I can restore it from backup without having to roll back the entire database.

Arantor

The error of 'table already exists' is the result of the 1.0 to 1.1 upgrade - not a later one. Renaming it will just break in other ways. It'll just be the next part of the upgrade that fails owing to the next schema change.

In your database, in the smf_settings table, what is given where the 'variable' is smfVersion?

Doug Heffernan

Quote from: von Corax on June 07, 2022, 02:49:19 PMI'm wondering if renaming the table might get me past the problem. I'm also wondering, if I mangle the table by accident, if I can restore it from backup without having to roll back the entire database.

Additionally, the table structure will be from the 1.1.x version, and it can not be used on the 2.0.x/2.1.x versions.

Quote from: von Corax on June 07, 2022, 02:44:48 PMI know; "In theory there's no difference between theory and practice..." I dumped the database and tarred the /forum directory, and it worked after I installed it on the test box, so it's as exact a copy as I know how to make it.

Here is an idea. Why do not make a backup of your upgraded test forum, install a brand new 2.0.19 forum in your live envirement and restore the backup there and run the repair_settings.php file afterwards to update all the paths and urls.

von Corax

Quote from: Arantor on June 07, 2022, 02:55:55 PMThe error of 'table already exists' is the result of the 1.0 to 1.1 upgrade - not a later one. Renaming it will just break in other ways. It'll just be the next part of the upgrade that fails owing to the next schema change.

In your database, in the smf_settings table, what is given where the 'variable' is smfVersion?

I shows as 1.1.16, despite the fact that I've installed the 1.1.21 patch.

von Corax

Quote from: Doug Heffernan on June 07, 2022, 04:16:46 PMHere is an idea. Why do not make a backup of your upgraded test forum, install a brand new 2.0.19 forum in your live envirement and restore the backup there and run the repair_settings.php file afterwards to update all the paths and urls.

I'd lose too many posts doing just that, but what I will try is re-cloning to test, upgrading test, and cloning back to production. I'll schedule that for tomorrow.

Doug Heffernan

Quote from: von Corax on June 07, 2022, 07:48:47 PM
Quote from: Doug Heffernan on June 07, 2022, 04:16:46 PMHere is an idea. Why do not make a backup of your upgraded test forum, install a brand new 2.0.19 forum in your live envirement and restore the backup there and run the repair_settings.php file afterwards to update all the paths and urls.

I'd lose too many posts doing just that, but what I will try is re-cloning to test, upgrading test, and cloning back to production. I'll schedule that for tomorrow.

That is what I meant, to re-clone the main forum again, sorry if I was not clear about it. Anyways, let us know how it will go.

von Corax

I got it running by downloading it to test, upgrading the database there, and then uploading and reinstalling it. Now I just need to fix the æsthetics. ::)

Advertisement: