From 6fe2c9aadf3f9958c8f1065587f1914d4b62ac7e Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Fri, 29 Jul 2022 15:48:36 +0200 Subject: [PATCH] Add upgrade guide (#387) * Create UPGRADE.md * Update UPGRADE.md Co-authored-by: Taylor Otwell --- UPGRADE.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 UPGRADE.md diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 0000000..0bb8d54 --- /dev/null +++ b/UPGRADE.md @@ -0,0 +1,22 @@ +# Upgrade Guide + +## Upgrading To 3.0 From 2.x + +### Minimum Versions + +The following dependency versions have been updated: + +- The minimum PHP version is now v8.0.2 +- The minimum Laravel version is now v9.21 + +### New `expired_at` Column + +Sanctum now supports expiring tokens. To support this feature, a new `expired_at` column must be added to your application's `personal_access_tokens` table. To add the column to your table, create a migration with the following schema change: + +```php +Schema::table('personal_access_tokens', function (Blueprint $table) { + $table->timestamp('expires_at')->nullable()->after('last_used_at'); +}); +``` + +Running this migration will require you to [install the `doctrine/dbal` package](https://laravel.com/docs/migrations#renaming-columns).