Is there any place that the original EE3 event ID is preserved when transitioning the data to EE4? I would like to find an easy way to recreate the data from my events_member_rel table such that it points to the new post IDs that correspond to the original events. We did such a large amount of customization to the Espresso Members add-on that I’d like to convert it to a custom plugin and keep it, adjusting as needed to make it work with EE4. It would be nice if the one-to-many relationship between WP Users and events and attendees could be preserved.
Or even better, is there a way to update the data conversion scripts so that they update the event ID field in the events_member_rel table and leave that table in tact?
I ran this query to retrieve and insert the event to user relationships: does this look correct?
insert into wp_esp_member_rel(event_id, user_id, attendee_id)
SELECT r.EVT_ID, (select ID from wp_users where user_email = CONVERT(ATT_email using utf8)), a.ATT_ID
FROM wp_esp_attendee_meta a
LEFT JOIN wp_esp_registration r ON r.ATT_ID = a.ATT_ID
I ran this query to populate my member_rel table, does it look correct?
insert into wp_esp_member_rel(event_id, user_id, attendee_id)
SELECT r.EVT_ID, (select ID from wp_users where user_email = CONVERT(ATT_email using utf8)), a.ATT_ID
FROM wp_esp_attendee_meta a
LEFT JOIN wp_esp_registration r ON r.ATT_ID = a.ATT_ID
wp_esp_member_rel isn’t actually a table added by or used by Event Espresso 4. Maybe you’ve built something that uses that table though?
In EE4, the event id is the post ID (stored in the wp_posts table) so since there are already posts & pages on the site, it’s not possible to preserve the event ID from EE3 so it’s the same as the post ID in EE4.
What you could do is make note of the very first event post ID and increment the event ID in the related tables. So for example if your EE3 event ID was 1, and your WP post ID for that event post migration is 12345, you’ll increment your event IDs in related tables by 12344.
Thanks, I did create that table, and populated it with the query above (sorry I accidentally posted it twice), and I think that will work for now. Later I will write a tool that will let an admin assign the relationships between registrations and a wp user account for the family.
Viewing 4 reply threads
The support post ‘preserve former event id in EE3 to EE4 data conversion?’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.