Behrooz Valikhani
Behrooz Valikhani

Reputation: 85

What is the reason behind uuid in laravel notifications

What is the reason uuid is the id in the notification system?

Upvotes: 6

Views: 2158

Answers (1)

Austen Cameron
Austen Cameron

Reputation: 342

The notifications table uses UUID's because they will scale much better for large applications and distributed databases. Since they aren't necessarily sequential, they are not subject to database column type limits either.

Here is a description straight from the ramsey/uuid library that laravel uses:

Anyone can create a UUID and use it to identify something with reasonable confidence that the same identifier will never be unintentionally created by anyone to identify something else. Information labeled with UUIDs can therefore be later combined into a single database without needing to resolve identifier (ID) conflicts.

Upvotes: 8

Related Questions