添加migrate

This commit is contained in:
Jerry Yan 2022-08-11 00:24:04 +08:00
parent b4928fa32e
commit cc57e4bb18
Signed by: q792602257
GPG Key ID: D070F653AF6C0004

View File

@ -0,0 +1,45 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class WebauthnCredential extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('webauthn_credentials', function (Blueprint $table) {
$table->id();
$table->string('name')->nullable();
$table->integer('user_id')->unsigned();
$table->string('attachment_type', 20)->nullable()->index();
$table->string('credential_id')->index();
$table->string('type');
$table->text('transports');
$table->string('attestation_type');
$table->text('trust_path');
$table->uuid('aaguid');
$table->text('credential_public_key');
$table->integer('counter')->unsigned();
$table->boolean('type_free')->default(false);
$table->dateTime('last_used_at')->nullable();
$table->dateTime('created_at')->nullable();
$table->dateTime('updated_at')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('webauthn_credentials');
}
}