-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Remove post_id column from orders table, use placeholder entries to find out of sync orders #32706
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8ec8e7d to
5350907
Compare
Note: column is just removed from the schema. No migration is added to remove the column on existing instances, since the feature is still in early stages of development.
This post type will be used for placeholder entries for orders that are created in the orders table when orders->posts sync is off (placeholder entries are created to reserve a proper order id)
Change the queries from relying on the now removed orders.post_id column to relying on the existence of placeholder records in the posts table.
5350907 to
87172da
Compare
These tests fail because the code that migrates orders is still not adapted to the removal of the post_id column in the orders table.
vedanshujain
approved these changes
Apr 21, 2022
Contributor
vedanshujain
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Contributor
|
Hi @vedanshujain, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
8 tasks
This was referenced Jul 4, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
All Submissions:
Changes proposed in this Pull Request:
We have decided to use placeholder entries in the posts table as the mechanism to prevent posts/orders id conflicts (#32086 (comment)), so this pull request implements the required changes:
post_idcolumn is removed from the orders table.Note: All the tests in
WPPostToCOTMigratorTestare temporarily skipped because the tested code is still not adapted to the removal of thepost_idcolumn; they need to be "de-skipped" after (or as part of) #32700.Closes #32663.
Closes #32665.
How to test the changes in this Pull Request:
Same testing instructions as in #32062. However, the SQL queries that create data for testing are now these (note that this time data needs to be created both in the new orders table and in the posts table):
Other information:
pnpm nx affected --target=changelog?FOR PR REVIEWER ONLY: