35 lines
1.0 KiB
PHP
35 lines
1.0 KiB
PHP
<?php
|
|
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
/**
|
|
* Run the migrations.
|
|
*/
|
|
public function up(): void
|
|
{
|
|
Schema::create('personal_access_tokens', function (Blueprint $table) {
|
|
$table->id('id');
|
|
$table->string('tokenable_type', 255)->nullable()->default(null);
|
|
$table->unsignedBigInteger('tokenable_id');
|
|
$table->string('name', 255)->nullable()->default(null);
|
|
$table->string('token', 64)->notNullable();
|
|
$table->text('abilities')->nullable()->default(null);
|
|
$table->timestamp('last_used_at')->nullable()->default(null);
|
|
$table->timestamp('expires_at')->nullable()->default(null);
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Reverse the migrations.
|
|
*/
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('personal_access_tokens');
|
|
}
|
|
};
|