master_template/database/migrations/2024_06_10_095838_creaete_tbl_personal_access_tokens.php

35 lines
1.0 KiB
PHP
Raw Normal View History

2024-06-10 12:21:58 +00:00
<?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');
}
};