-
Notifications
You must be signed in to change notification settings - Fork 38
Analytics Performance: Add access to revenue stats from range ID queries #2785
Conversation
…fetchRevenueStats
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.
Great work, Thomaz! The code looks good and is working as expected. Tested alongside the Woo PR.
LGTM!
db.execSQL("ALTER TABLE PostModel ADD AUTO_SHARE_ID INTEGER") | ||
} | ||
191 -> migrate(version) { | ||
db.execSQL("ALTER TABLE WCRevenueStatsModel ADD RANGE_ID INTEGER") |
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.
Nice!
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.
I almost miss something 🤦
You must replace 191 -> migrate(version)
to migrateAddOn(ADDON_WOOCOMMERCE, version)
otherwise the WP app will crash because it doesn't have the WCRevenueStatsModel
table
Wow, sorry that I forgot about this @atorresveiga, thank you so much for finding it in time to avoid a huge problem 😬 It's fixed now! |
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.
Awesome work Thomaz! Using the new revenueRangeId is a great addition that will make our life easier when working with the stats.
LGTM!
Summary
Introduces an external way to define a Revenue Stats range through an ID, making sure that we can insert/update/select any Revenue stats data through a range ID when available.
How to Test
Update release notes:
RELEASE-NOTES.txt
if necessary.