diff --git a/upgrade.md b/upgrade.md index 9622366bce8..3c36db1d397 100644 --- a/upgrade.md +++ b/upgrade.md @@ -12,6 +12,15 @@ + +## Medium Impact Changes + +
+ +- [Models and UUIDv7](#models-and-uuidv7) + +
+ ## Low Impact Changes @@ -134,6 +143,23 @@ $table = Schema::getTableListing(schema: 'main', schemaQualified: false); The `db:table` and `db:show` commands now output the results of all schemas on MySQL, MariaDB, and SQLite, just like PostgreSQL and SQL Server. + +### Eloquent + + +#### Models and UUIDv7 + +**Likelihood Of Impact: Medium** + +The `HasUuids` trait now returns UUIDs that are compatible with version 7 of the UUID spec (ordered UUIDs). If you would like to continue using ordered UUIDv4 strings for your model's IDs, you should now use the `HasVersion4Uuids` trait: + +```php +use Illuminate\Database\Eloquent\Concerns\HasUuids; // [tl! remove] +use Illuminate\Database\Eloquent\Concerns\HasVersion4Uuids as HasUuids; // [tl! add] +``` + +The `HasVersion7Uuids` trait has been removed. If you were previously using this trait, you should use the `HasUuids` trait instead, which now provides the same behavior. + ### Requests