-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database migration didn't work properly #28155
Comments
Pinging @youknowriad as the author of #27910 for feedback. |
I assumed the "delete_term" does remove the relationships but it seems that it doesn't. and I forgot about the options. |
I think it is meant to. I can't work out why it doesn't here, but I'd guess it's the auto-draft status causing trouble again. |
Do you have an idea on how we could overcome that? |
If you were desperate you could always write out the queries through |
|
Hmm, while |
It's more complicated than that. The call to It might be wise to write some unit tests for this, if it's possible to do so. |
I might have a promising lead 😬 Compare https://github.com/WordPress/gutenberg/pull/27910/files#diff-d8826d0f767301135f001ac1a09905bf32198b6604bf6a3fdf15799ea4c7ea48L119 to https://github.com/WordPress/gutenberg/pull/27910/files#diff-25417a675fde0cd7653118033809d3692e62da2788c4ac63d2f8d42eca4a29a8R52 We're setting Maybe it's as simple as that 🤞 |
The other problem seems to be that |
Describe the bug
The database migration introduced in #27910 did not erase all of the data it was designed to erase.
Auto-drafts are correctly erased but their term relationships didn't get erased. In other words, you end up with "orphan" entries in the term relationships table.
The
_wp_file_based
term didn't get erased.The
gutenberg_last_synchronize_theme_template_checks
option didn't get erased.The
gutenberg_last_synchronize_theme_template-part_checks
option didn't get erased.Expected behavior
Either the migration needs to be complete, or don't bother including a migration at all.
Editor version (please complete the following information):
The text was updated successfully, but these errors were encountered: