-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed: all add-ons got duplicated in the addon table #6652
Conversation
this won't fix the issue for anyone who upgraded in the meantime by running a nightly or compiling from source. those will have to delete |
I don't think it certainly create duplicates though. I haven't been able to reproduce it so far, I'm not sure what the exact conditions are, but I guess that line is still wrong. Can't you rather bump version and add a special case for v17 that clears the |
sure, will add the bump. |
updated the PR to remove the dupes, but only if the user was running db version 17. jenkins build this please |
@@ -324,7 +328,7 @@ bool CAddonDatabase::GetAddons(VECADDONS& addons, const ADDON::TYPE &type /* = A | |||
if (NULL == m_pDB.get()) return false; | |||
if (NULL == m_pDS2.get()) return false; | |||
|
|||
std::string sql = PrepareSQL("select distinct addonID from addon"); | |||
std::string sql = PrepareSQL("SELECT DISTINCT a.addonID FROM addon a, addonlinkrepo b WHERE b.idRepo > 0 AND a.id = b.idAddon"); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
build failure unrelated |
fixed: all add-ons got duplicated in the addon table
PR #6568 deleted all repo entries from the db, but didn't delete the add-ons. This leads to a dupe of each add-on when upgrading from an older version, as the repo gets inserted another time, including all it's add-ons.
Fixed by defaulting to version 0.0.0, which just triggers an update.
ping @tamland @mkortstiege @MartijnKaijser