Tiny Tiny RSS: Community

Upgrade from a very old version and duplicate entry


I am upgrading a very old version of tinyrss to the latest one and I’ve the following

[15:34:13/17094] Performing updates to version 138
[15:34:13/17094] * Updating to version 137…
[15:34:13/17094] > begin
[15:34:13/17094] > alter table ttrss_feeds add constraint ttrss_feeds_feed_url_owner_uid_key unique (feed_url(255), owner_uid)
[15:34:13/17094] Error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘2’ for key ‘ttrss_feeds_feed_url_owner_uid_key’
[15:34:13/17094] One of the updates failed. Either retry the process or perform updates manually.

Before started update from 127 it seems

[15:33:56/17090] Performing updates to version 138
[15:33:56/17090] * Updating to version 127…
[15:33:56/17090] > BEGIN
[15:33:56/17090] > UPDATE ttrss_version SET schema_version = 127
[15:33:56/17090] > COMMIT
[15:33:56/17090] * Completed.
[15:33:56/17090] * Updating to version 128…

Any way to fix the db manually?

There are some challenges with a few schema updates when using MySQL.

See the FAQs Schema Upgrade Fails on MySQL 5.7.

Also see:

There some discussion about schema upgrade failures in the old forum but it’s not working at the moment (I’ve mentioned this to fox).

you will have to find the duplicate feed and remove it (or change the URL somehow, i.e. add a question mark to the end) then schema upgrade should apply.

the forum will remain half broken i guess because of php changes but the posts should be readable now.

e: thanks to monkey patches provided by https://www.stephan-frank.de/board/index.php?topic=2.0 oldforum lives again, sorta.

Thanks! let me try finding that duplicate key :slight_smile:

Upgrade complete thanks!