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

Default deck / model ID generation could result in collision #2

Open
z1lc opened this issue Oct 1, 2018 · 0 comments
Open

Default deck / model ID generation could result in collision #2

z1lc opened this issue Oct 1, 2018 · 0 comments

Comments

@z1lc
Copy link

z1lc commented Oct 1, 2018

Anki uses the current time (in milliseconds) as the ID when it creates most rows in the SQLite database. By generating a random number within this range, I think there is a risk of re-using an already-taken deck and/or model ID. Another option is to follow the same standard (also use time in millis), or create cards with IDs far outside the range.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant