Skip Navigation

[Resolved] When backing up the site to a staging server I get an error "no primary key"

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 1.53 hours from now. Thank you for your understanding.

This topic contains 2 replies, has 2 voices.

Last updated by Ian Henderson 1 year, 11 months ago.

Author
Posts
#2514487

When backing up and restoring this site to a staging server using Updraft Plus I get the following hundreds of rows of errors on restoration: "prefix_toolet_post_guid_id" has no primary key, manual change needed on row XXX.

The site appears to function normally but I'm concerned about this. Can you clarify what's going on here?

#2514623

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2022-12-13 at 12.51.06.png

Hi Ian

I'm not sure what Updraft Plus means by manual change needed, as I doubt any action is required.

The WordPress database tables typically have a primary key, but it's not required. What is required is that each table have a unique index key, and the toolset_post_guid_id table does have a unique key (screenshot).

I think this is essentially a false positive which it is safe to ignore.

#2514649

Thanks Nigel - yes, Updraft said the same thing:

This is nothing to worry about.

UpdraftPlus uses your GUID for your surrogate key. This is because just in case you have to merge your DB with another DB or data set at any point.

For example you have a customer table with an identity key and varied relationships based on that key. You need to merge this with another database of customers and relationships. In order to do this you have to resolve primary key conflicts because the second database has PKs that match your current customer table. Using GUIDs as your surrogate key instead guarantees that you can merge those tables without concern.