Skip to content

Commit

Permalink
Add migration for Sanctum 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
laravel-shift committed Sep 20, 2024
1 parent 51fa7b7 commit 577623a
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('personal_access_tokens', function (Blueprint $table) {
$table->timestamp('expires_at')->nullable()->after('last_used_at');
});
}

/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('personal_access_tokens', function (Blueprint $table) {
$table->dropColumn('expires_at');
});
}
};

0 comments on commit 577623a

Please sign in to comment.