137 adds a composite key which enforces subscribed feeds being unique per-user. Previously tt-rss UI would prevent this in most cases but one way or another it was possible to have duplicate feeds (for example, through recently fixed bug in batch subscribe).
In this case upgrade to schema
137 will fail with an error similar to this one:
Error: SQLSTATE: Unique violation: 7 ERROR: could not create unique index “ttrss_feeds_feed_url_owner_uid_key” DETAIL: Key (feed_url, owner_uid)=(http://example.com/feed, 1) is duplicated.
How to resolve this:
- Delete problematic feeds directly from the database (easiest):
DELETE FROM ttrss_feeds WHERE id NOT IN (SELECT DISTINCT ON (feed_url, owner_uid) id FROM ttrss_feeds);
Edit: mysql variant below, untested but seemingly works (as usual I suggest backing up your database!):
DELETE f1 FROM ttrss_feeds f1 INNER JOIN ttrss_feeds f2 WHERE f1.id < f2.id AND f1.feed_url = f2.feed_url AND f1.owner_uid = f2.owner_uid;
This will only delete duplicate feed entries. Then re-run database updater.
- Through tt-rss UI aka the hard way:
You’ll need to go to a previous changeset first, for example
git checkout dd9e93384
Open tt-rss as usual and unsubscribe from duplicate feeds indicated in the above error message. Then go back to master branch
git checkout master
And re-run database updater.