Skip to content

Use UUID for table primary keys. #28

@innershell

Description

@innershell

The two main reasons for doing this are:

  • Can assign an object an ID in your application layer and insert it into the database later. This allows batch inserts of objects without needing to run a SELECT query later to get the IDs.
  • Can copy data across from one database to another without worrying about identifiers clashing. Thus there is no need to change them and worry about maintaining the foreign key relationships.

https://blog.programster.org/php-using-uuid-instead-of-auto-increment-or-sequence

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions