Skip to content
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

[Manual Search] Make URL column unique in providers table in cache database #44

Merged
merged 0 commits into from
Feb 27, 2016

Conversation

fernandog
Copy link
Contributor

Fix dupe items

Need erase cache.db or should do a ALTER TABLE do change existing cache.db to use UNIQUE?

@labrys @p0psicles @medariox @OmgImAlexis this PR fixed issue..... but we already have this in code but it seems its not working!

            # add unique index to prevent further dupes from happening if one does not exist
            self.action("CREATE UNIQUE INDEX IF NOT EXISTS idx_url ON [" + providerName + "] (url)")

Seems code already remove dups. but only at boot:

                 for cur_dupe in sql_results:
                     self.action("DELETE FROM [" + providerName + "] WHERE url = ?", [cur_dupe["url"]])

I know SQL but not an expert

@fernandog fernandog added the Bug label Feb 27, 2016
@fernandog
Copy link
Contributor Author

I think it worked. See first item: Before 161 seeds than 168

First search

image

After forced results

image

@fernandog fernandog merged this pull request into manual-search Feb 27, 2016
@fernandog
Copy link
Contributor Author

will merge for now

@labrys labrys deleted the url_unique branch February 29, 2016 06:12
@fernandog fernandog changed the title Make URL column unique in providers table in cache database [Manual Search] Make URL column unique in providers table in cache database Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant