First round of refinements on the login system...

There's a lot more to do on the to-do list
This commit is contained in:
Dan Baker 2026-02-22 20:02:09 +00:00
parent 82ed2e3ce2
commit 1b241aeddb
7 changed files with 390 additions and 219 deletions

View file

@ -0,0 +1,33 @@
<?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::table('magic_login_tokens', function (Blueprint $table) {
$table->dropColumn(['plain_token', 'plain_code']);
$table->string('token_hash', 64)->change();
$table->unique('token_hash');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('magic_login_tokens', function (Blueprint $table) {
$table->dropUnique(['token_hash']);
$table->string('token_hash')->change();
$table->string('plain_token')->after('token_hash');
$table->string('plain_code', 6)->after('code_hash');
});
}
};