We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SQL2300 Error While Updating from v3.5.1 to v7.1.6

How Do I?

coreynash's avatar
coreynash
4 posts
about 4 months ago
coreynash's avatar coreynash

I am trying to update our business website from v3.5.1 to v7.1.6 and keep getting the following error:

Exception Caught

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '1-1' for key 'PRIMARY':
INSERT INTO `exp_channel_field_groups_fields` (`field_id`, `group_id`) VALUES (1, 1)

mysqli_connection.php:122

Anyone have any solutions to get passed this? So far the upgrade got to v3.5.17 and then this exception happened.

       
Tom Jaeger's avatar
Tom Jaeger
316 posts
about 4 months ago
Tom Jaeger's avatar Tom Jaeger

Thanks for posting this.

It sounds like you have some bad (duplicate) data in that table.

If you sort that table by “field_id” do you have 2 rows that have field_id set to “1” as well as group_id set to “1”?

If so, I’d recommend backing that table up (always a good idea to backup your whole DB before an upgrade as well).. and delete one of the rows. From there you should be good to go!

Thanks,

-Tom Jaeger

       
coreynash's avatar
coreynash
4 posts
3 months ago
coreynash's avatar coreynash

Tom,

Supposedly this table has a column called “channel_id” and then column two is “group_id”. There were 5 duplicates (1-1, 2-2, 3-3, 4-4, 5-5). I removed those and then continued with the installation. The same error came up but this time for (15-9), which doesn’t make any sense. I went as far as removing the whole database and it seems like the upgrade re-installs the duplicates again. Not sure what else to do. This is my first time going through an upgrade like this and kind of crazy that this doesn’t really match the documentation to upgrade from v3.5.1 to v7.1.6.

Any more advice as far as trying to upgrade our EE instance without having to lose data or manually bring in the data into v7?

       
Tom Jaeger's avatar
Tom Jaeger
316 posts
3 months ago
Tom Jaeger's avatar Tom Jaeger

Few quick questions for you on this front…

Did you get the additional duplicates error after the upgrade was complete? Or was this during the upgrade process?

How many fields do you have in your install?

Any chance you can post a list of add-ons currently in use?

After taking a peek at the code that does this migration of data (part of the 4.0.0 update)… I’m wondering if you might have bad data in your exp_channel_fields table prior to upgrade… If you take a peek at that table, do you see duplicate data for field_id or group_id in there?

Also, how is the upgrade being run? (1 click, manual file drop in)

I know this is a lot of questions… we’re hoping we can get an indication of where things are heading the wrong way.

Thanks,

-Tom Jaeger

       
coreynash's avatar
coreynash
4 posts
3 months ago
coreynash's avatar coreynash

Sorry for the delayed response.

The upgrade never completed. This error came up during the upgrade process and stopped at 3.5.17 I believe. Here is the table that I have under our table exp_channels_channel_field_groups. As you can see, there are duplicates in both columns. This is for the current install of EE 3 on local that is copying what is in production at the moment.

I even tried deleting this column and the upgrade still added the (1-1, 2-2, etc.) and complains about it. Doesn’t make any sense, but I’m sure there is something that wasn’t setup right to begin with in the previous version that we have.

       
Tom Jaeger's avatar
Tom Jaeger
316 posts
3 months ago
Tom Jaeger's avatar Tom Jaeger

Are you still running into this issue?

       
coreynash's avatar
coreynash
4 posts
3 months ago
coreynash's avatar coreynash

Tom,

I actually deleted everything with exp_channels at the beginning as there was two other tables with just the singular form of channel. That resolved the issue. Thank you!

       
Tom Jaeger's avatar
Tom Jaeger
316 posts
3 months ago
Tom Jaeger's avatar Tom Jaeger

Thanks for the update…. Odd… will keep that in mind

(Robin and I took a peek at the upgrade script as well)

Glad to hear your in good shape!

       
henrypope's avatar
henrypope
5 posts
2 months ago
henrypope's avatar henrypope

I am trying to update our business website from v3.5.1 to v7.1.6 and keep getting the following error: Exception Caught SQLSTATE[23000].

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.