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

Add next card ID to export format? #4

Open
kj7rrv opened this issue Jan 23, 2022 · 2 comments
Open

Add next card ID to export format? #4

kj7rrv opened this issue Jan 23, 2022 · 2 comments

Comments

@kj7rrv
Copy link
Contributor

kj7rrv commented Jan 23, 2022

Right now, if you create a card, delete it, export your cards, import them into another device, and create a new card, it will have the same ID as the deleted card. Would it be possible to fix this by adding the next card ID to use to the bottom of the CSV file? The parser would have to guess the value based on the cards table if it wasn't present.

@TheLastProject
Copy link
Member

I think adding a number for which card ID to use next won't solve this. Imagine this situation:

  1. You have 3 cards
  2. You create a new card on your Android phone
  3. You create a new card on your PinePhone

Then you will already have an ID conflict too.

I think we should maybe change the card ID to be something like the UNIX creation timestamp, so there can only be a conflict if you create 2 cards at the exact same second on multiple devices.

@kj7rrv
Copy link
Contributor Author

kj7rrv commented Jan 23, 2022

Okay, that's a good idea. Probably safe to assume no one will create two cards in one second?

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

2 participants