[data-migration] Duplicate articles created when update daemon runs after importing

I’m migrating from MySQL to PostgreSQL and have run into an issue. The first time the update daemon runs after using data-migration its creates unread duplicates of the articles imported with data-migration.

Steps:

  1. Exported articles from MySQL with data-migration (–data_user admin --data_export articles.zip)
  2. Created new PostgreSQL database.
  3. Ran install.
  4. Created tt-rss users.
  5. Imported OPML including settings.
  6. Imported articles with data-migration (update.php --data_user Joseph --data_import articles.zip)
  7. Update daemon runs, duplicate unread articles created.

screenshot: https://files.verifiedjoseph.uk/tt-rss-screenshot.PNG

tt-rss version:
v20.05-a1ffc1161

Platform:
DigitalOcean, Ubuntu 18.04.4, PostgreSQL 10.12, PHP 7.4.6

article GUID in the database includes user id, if its different on target instance this will happen.

you can consider this a limitation of the plugin because recalculating the GUID from its hashed form is not possible.

Right, ok. I’ll just go back to using the admin account.

Thanks for the quick reply.

I’ve changed the way GUID is stored in the database, so this should stop being a problem for newer articles (as soon as data_migration is updated to properly transform new GUIDs).

https://git.tt-rss.org/fox/tt-rss/commit/cd1f3cb8cc5fc6e3679fb778ee23f35d179b0a1c

https://git.tt-rss.org/fox/ttrss-data-migration/commit/4b90e6c0e152c2ee4ce3045ec13c29c9117470fc

i’ve (finally) updated data_migration to transform v2 guid on import, completely forgot about it.