hypothetical/database/migrations/0001_01_01_000003_create_personal_access_tokens_table.php

34 lines
856 B
PHP
Raw Normal View History

2022-05-23 21:01:33 -04: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.
*/
2023-03-13 17:33:19 -04:00
public function up(): void
2022-05-23 21:01:33 -04:00
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->id();
$table->morphs('tokenable');
$table->string('name');
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('expires_at')->nullable();
2022-05-23 21:01:33 -04:00
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
2023-03-13 17:33:19 -04:00
public function down(): void
2022-05-23 21:01:33 -04:00
{
Schema::dropIfExists('personal_access_tokens');
}
};