Update underlying model representation for PATs

This commit is contained in:
Dane Everitt 2021-07-28 20:53:54 -07:00
parent d60e8a193b
commit 1a3451fb0d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
12 changed files with 135 additions and 24002 deletions

View file

@ -15,12 +15,15 @@ class CreatePersonalAccessTokensTable extends Migration
{
Schema::create('personal_access_tokens', function (Blueprint $table) {
$table->bigIncrements('id');
$table->morphs('tokenable');
$table->string('name');
$table->unsignedInteger('user_id');
$table->char('token_id', 16)->unique();
$table->string('token', 64)->unique();
$table->text('abilities')->nullable();
$table->json('abilities')->nullable();
$table->string('description');
$table->timestamp('last_used_at')->nullable();
$table->timestamps();
$table->foreign('user_id')->references('id')->on('users')->cascadeOnDelete();
});
}