This PR can be summarized in the following changelog entry:
The migration of the premium keywords could not only fail on cruser_id, but also when the premium table had other fields which were not present in the new table. This PR filters the array to insert by only allowing columns which are present in the new table.
Relevant technical choices:
Retrieve the columns from the SchemaManager and return it as a flipped array from the keys only, to use the array_intersect_key on every insert
Test instructions
This PR can be tested by following these steps:
Pull branch
Manually add a column to the old tx_yoast_seo_premium_focus_keywords table (and make sure it contains records)
Run the upgrade wizard and check for errors and if the data has been successfully migrated
Quality assurance
[X] I have tested this code to the best of my abilities
[ ] I have added unittests to verify the code works as intended
Summary
This PR can be summarized in the following changelog entry:
cruser_id
, but also when the premium table had other fields which were not present in the new table. This PR filters the array to insert by only allowing columns which are present in the new table.Relevant technical choices:
SchemaManager
and return it as a flipped array from the keys only, to use thearray_intersect_key
on every insertTest instructions
This PR can be tested by following these steps:
tx_yoast_seo_premium_focus_keywords
table (and make sure it contains records)Quality assurance