Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Duplicate organization and repository rows under star history table #17

Closed
joshenlim opened this issue Dec 25, 2020 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@joshenlim
Copy link
Member

joshenlim commented Dec 25, 2020

Bug report

Been noticing a couple of rows with repeated organization and repository name pairs (not too sure if its from testing, but the data in this table is not that important since its a cache so not to worry). I did verify that the updating of the cache is working without inserting new rows though. Two possible solutions:

  • Do a check if a row with the organization and repo exists before inserting

  • Change PK of the table to be organization and repository to enforce this from the DB

Personally feel that option 2 is more optimal - i guess this is one of the instances which the table editor should support creation of more than 1 PK for a table as well haha

For now, we can do it via the second method by good ol' SQL query

@joshenlim joshenlim added the bug Something isn't working label Dec 25, 2020
@joshenlim joshenlim self-assigned this Dec 25, 2020
@joshenlim
Copy link
Member Author

odd i was testing this again and it seems like the cacheing wasn't causing any duplication - nonetheless i've created a table with organization and repository forming a composite primary key to enforce this.

if anyone wants do any testing though, i've kept the old stars history table and renamed it as stars_legacy - feel free to use that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant