Add new unique constraint and improved nonce-checking logic

This commit is contained in:
Brady Wetherington
2026-05-05 15:23:07 +01:00
parent d099bf2983
commit 5b0a779c07
2 changed files with 39 additions and 7 deletions
@@ -0,0 +1,30 @@
<?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('saml_nonces', function (Blueprint $table) {
$table->dropIndex(['nonce']);
$table->unique('nonce');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('saml_nonces', function (Blueprint $table) {
$table->dropUnique(['nonce']);
$table->index('nonce');
});
}
};