feat: Use GUID to identify articles in RSS feeds#171
feat: Use GUID to identify articles in RSS feeds#171guyfedwards merged 1 commit intoguyfedwards:masterfrom
Conversation
|
The downside here is that because we weren't previously recording the GUID, the first time this runs with this change it will create a bunch of duplicate entries. |
| // Index based so all new migrations must go at the end of the array | ||
| migrations := []string{ | ||
| `alter table items add favourite boolean not null default 0;`, | ||
| `alter table items add guid text`, |
There was a problem hiding this comment.
I think we need an update table set guid = link; here to fix existing entries
There was a problem hiding this comment.
I think this will fix the issue of duplicate entries as the first time nom loads with these changes it will migrate the existing entries
There was a problem hiding this comment.
That will address some cases, but some blogs use e.g. UUIDs for the <guid> value, so we'll still see duplicates. The alternative would be to just use the <link> value instead of <guid>, which maybe is fine?
There was a problem hiding this comment.
Using <link> works well; I just didn't go that route originally because, you know, there was a GUID. But using <link> seems better for compatability. I'm going to update the PR.
Use Link rather than title to correlate feeds items with database items. This permits us to correctly handle title changes without creating duplicate entries. Closes guyfedwards#167
|
I've updated the PR to use the Link attribute instead of GUID as the unique identifier, but I've left in the code that gathers and stores the GUID from the feed. |
|
thanks @larsks |


Use Link rather than title to correlate feeds items with database items.
This permits us to correctly handle title changes without creating
duplicate entries.
Closes #167