mooxphp/moox

View on GitHub
packages/passkey/database/migrations/create_passkeys_table.php.stub

Summary

Maintainability
Test Coverage
<?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('passkeys', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->unsignedBigInteger('user_id');
            $table->string('user_type');
            $table->text('credential_id');
            $table->text('public_key');
            $table->unsignedBigInteger('device_id')->nullable;
            $table->string('session_id')->nullable;
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void

    {
        Schema::dropIfExists('passkey');
    }
};