Skip Navigation

[Resolved] Relationships Migration issues

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1133570

I copied Admiralcareservices.com to a local instance
went to Toolset > relationships
clicked start the migration
The 1st time I did this the legacy scan found these issues
CRED From #36873: "Add SU" - line 183, column 22 _wpcf_belongs_zurg_id' value='' sel
CRED From #36893: "Add Care Plan" - line 7, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #40113: "Service User Qs" - line 62, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #42403: "Service User File note" - line 13, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #44726: "Test HR Note" - line 22, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #44880: "Send Note to SENIOR HR Team" - line 20, column 22 _wpcf_belongs_hr-record-basic_id' v
CRED From #44954: "Send Note to Care Team" - line 19, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #50806: "Upload HR Document" - line 27, column 22 _wpcf_belongs_hr-record-basic_id' v
CRED From #55187: "Spot Checks Form" - line 6, column 22 _wpcf_belongs_hr-record-basic_id' v
CRED From #55286: "Accident or Near Miss Form" - line 7, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #55286: "Accident or Near Miss Form" - line 11, column 22 _wpcf_belongs_hr-record-basic_id' v
CRED From #75187: "Upload Service User Document" - line 16, column 22 _wpcf_belongs_service-user-basic-d_
CRED From #75213: "Send a Note to the HR Team" - line 16, column 22 _wpcf_belongs_hr-record-basic_id' v

I ignored this and went ahead and tried the migration

It failed due to a sql error (could not create table)

I tried again and it failed.

I tried the migration again and this time the legacy scan did not find any problems
but the SQL error still persists (tried twice)

> Post relationships migration started.
> Not using maintenance mode for the migration.
> No tables had to be dropped.
> Unable to create table RQ7T2sewUU_toolset_associations due to a MySQL Error:
> Unable to create table RQ7T2sewUU_toolset_relationships due to a MySQL Error:
> Unable to create table RQ7T2sewUU_toolset_type_sets due to a MySQL Error:
> Post relationships migration started.
> Not using maintenance mode for the migration.
> No tables had to be dropped.
> Unable to create table RQ7T2sewUU_toolset_associations due to a MySQL Error:
> Unable to create table RQ7T2sewUU_toolset_relationships due to a MySQL Error:
> Unable to create table RQ7T2sewUU_toolset_type_sets due to a MySQL Error:

I assume, when I checked the box to say I had fixed the legacy issues that was stored in the DB somewhere & I need to re install the DB (or find the entry for it?)

And that you can help me sort the legacy issues listed above?

#1133672

Hi, do you have access to your server's MySQL logs? I'm curious to see if there's any more information about the error where the tables cannot be created. You may be able to access those by going to your host's Control Panel.

If you're not able to access those logs, or if they don't provide any relevant information, use phpMyAdmin or another application to access your database and check to see if these new tables exist:
RQ7T2sewUU_toolset_associations
RQ7T2sewUU_toolset_relationships
RQ7T2sewUU_toolset_type_sets

If not, then you can try running the migration with the default Twenty Seventeen theme active and all plugins deactivated except Toolset.

I assume, when I checked the box to say I had fixed the legacy issues that was stored in the DB somewhere & I need to re install the DB (or find the entry for it?)
We built in some backwards compatibility so Forms using the old syntax will continue to work. After the migration is complete you can test out these Forms to be sure things are still working as expected. If not, you can regenerate the Form code, which will implement the new relationship syntax.

The most important things to check are custom code snippets in your theme. If you're accessing post relationships in any custom code, it may need to be updated to use the new Post Relationships API.