Skip to content

Refactor: Use UUID for Primary Keys Across All Tables #180

Open
@diyor28

Description

@diyor28

Description

Refactor the database schema to use UUIDs as primary keys instead of auto-incremented integers across all tables. This change enhances flexibility at the application level, improves data uniqueness across distributed systems, and allows for safer merging of records between environments.

Rationale

  • Uniqueness & Global Scope: UUIDs are globally unique, preventing conflicts when syncing data across environments.
  • Security: UUIDs make it harder for malicious users to guess entity counts or infer business metrics.
  • Decoupling from Database Logic: UUIDs allow application-level key generation, reducing dependency on database-specific auto-increment behavior.
  • Scalability & Distribution: Easier replication and sharding in distributed systems.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions