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

Why not use UUID for PK? #4425

Open
1 task done
mrgaolei opened this issue Dec 5, 2024 · 2 comments
Open
1 task done

Why not use UUID for PK? #4425

mrgaolei opened this issue Dec 5, 2024 · 2 comments
Labels
note:discussion Details or approval are up for discussion note:more information needed The reporter has to provide more information

Comments

@mrgaolei
Copy link
Contributor

mrgaolei commented Dec 5, 2024

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

Now PrimaryKey type is int, for 'drives', 'charges' etc..
When I have deploy more instance, for example:
On AWS, I run Teslamte sine 2021-2023,
On my NAS, I run Teslate sine 2023-2024.
int PK can't merge those data.
If change to UUID, it can be merge.

Expected Behavior

No response

Steps To Reproduce

No response

Relevant log output

Database issues

Screenshots

No response

Additional data

No response

Type of installation

Docker

Version

v1.24.1

@JakobLichterfeld
Copy link
Collaborator

Thanks for reporting.

Can you elaborate on your use case? If you have two instances collecting the same data, why would you want to merge them?

Version

v1.24.1

Even if unrelated, this versions is outdated.

@JakobLichterfeld JakobLichterfeld added the note:more information needed The reporter has to provide more information label Dec 5, 2024
@brianmay
Copy link
Collaborator

brianmay commented Dec 5, 2024

Use of UUIDs everywhere is not going to be a magic bullet that solves all these issues (and may have some other issues I don't want to go into here). For example, you would still end up with two sets of cars, and not sure I see any benefit here over just having two databases.

It is clear however that we really could use some sort of tool that will take two databases, a list of instructions concerning which cars (and maybe other resources) are the same, and output a new merged database.

@JakobLichterfeld JakobLichterfeld added the note:discussion Details or approval are up for discussion label Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
note:discussion Details or approval are up for discussion note:more information needed The reporter has to provide more information
Projects
None yet
Development

No branches or pull requests

3 participants