newtab Inferred personalization setup places db tables, indices and migrations for impressions and clicks
Categories
(Firefox :: New Tab Page, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox140 | --- | fixed |
People
(Reporter: thecount, Assigned: thecount)
References
Details
Attachments
(1 file)
| Assignee | ||
Comment 1•11 months ago
|
||
Updated•11 months ago
|
Updated•11 months ago
|
Comment 3•11 months ago
|
||
| bugherder | ||
Comment 4•11 months ago
•
|
||
I just noticed a possible typo in CREATE_IDX_MOZ_NEWTAB_IMPRESSION_TIMESTAMP that seems to refer to the clicks table instead.
I also see errors in the browser console like "Error: Error(s) encountered during statement execution: no such table: moz_newtab_story_click_idx_newtab_impression_timestamp" due to this code that was assuming indices name ended by "index". I honestly didn't remember about that. I think the code is a bit fragile, it should probably check the entity type SELECTing by name from "sqlite_master".
The former will require another db migration to be fixed (we can avoid having a new test though), removing the old index and creating the correct one.
| Assignee | ||
Comment 5•11 months ago
|
||
Yup I think you're right.
I'm not really sure how to write a migration for this yet.
Any help or examples of a similar previous migration is appreciated.
We should probably make another bug for this right?
Comment 6•11 months ago
|
||
yeah, we need a separate bug. The migration is pretty much similar, bump up version, DROP INDEX IF EXISTS name, call new CREATE_IDX_ macro
Updated•10 months ago
|
Description
•