<?php
declare(strict_types=1);

use Celena\Core\Database\Blueprint;
use Celena\Core\Database\Connection;
use Celena\Core\Database\Schema;

return function (Schema $schema, Connection $conn): void {
    $schema->create('celena_remember_tokens', function (Blueprint $t) {
        $t->id();
        $t->string('selector', 32);
        $t->string('token_hash', 128);
        $t->bigInteger('user_id');
        $t->datetime('expires_at');
        $t->datetime('created_at')->nullable();
        $t->unique('selector');
        $t->index('user_id');
    });
};
